Address some warnings on test code

This commit is contained in:
Alexander Mai 2017-05-03 14:39:21 +02:00
parent a8e12a6f29
commit 6db9c78fb6
3 changed files with 39 additions and 38 deletions

View File

@ -927,6 +927,7 @@ private:
ASSERT_EQUALS(0, parser.GetIgnoredPaths().size());
}
/*
void ignorepaths1() {
REDIRECT;
const char *argv[] = {"cppcheck", "-isrc", "file.cpp"};
@ -954,7 +955,7 @@ private:
ASSERT_EQUALS("src/", parser.GetIgnoredPaths()[0]);
ASSERT_EQUALS("module/", parser.GetIgnoredPaths()[1]);
}
*/
void ignorepaths4() {
REDIRECT;
const char *argv[] = {"cppcheck", "-i", "src", "-i", "module", "file.cpp"};
@ -964,7 +965,7 @@ private:
ASSERT_EQUALS("src/", parser.GetIgnoredPaths()[0]);
ASSERT_EQUALS("module/", parser.GetIgnoredPaths()[1]);
}
/*
void ignorefilepaths1() {
REDIRECT;
const char *argv[] = {"cppcheck", "-ifoo.cpp", "file.cpp"};
@ -973,7 +974,7 @@ private:
ASSERT_EQUALS(1, parser.GetIgnoredPaths().size());
ASSERT_EQUALS("foo.cpp", parser.GetIgnoredPaths()[0]);
}
*/
void ignorefilepaths2() {
REDIRECT;
const char *argv[] = {"cppcheck", "-isrc/foo.cpp", "file.cpp"};

View File

@ -1090,7 +1090,7 @@ private:
}
void garbageCode144() { // #6865
//ASSERT_THROW(checkCode("template < typename > struct A { } ; template < typename > struct A < INVALID > : A < int[ > { }] ;"), InternalError);
checkCode("template < typename > struct A { } ; template < typename > struct A < INVALID > : A < int[ > { }] ;");
}
void garbageCode146() { // #7081

View File

@ -57,7 +57,7 @@ private:
TEST_CASE(version);
}
Library::Error readLibrary(Library& library, const char* xmldata) const {
static Library::Error readLibrary(Library& library, const char* xmldata) {
tinyxml2::XMLDocument doc;
doc.Parse(xmldata);
return library.load(doc);