Skip to content

Commit fa7645e

Browse files
committed
Added CheckStl to garabage code testing.
1 parent c3c8132 commit fa7645e

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/cxx11emu.h lib/toke
474474
test/testfilelister.o: test/testfilelister.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/settings.h lib/standards.h lib/timer.h
475475
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -std=c++0x -c -o test/testfilelister.o test/testfilelister.cpp
476476

477-
test/testgarbage.o: test/testgarbage.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/tokenize.h lib/tokenlist.h lib/checkother.h lib/check.h lib/settings.h lib/standards.h lib/timer.h
477+
test/testgarbage.o: test/testgarbage.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/tokenize.h lib/tokenlist.h lib/checkother.h lib/check.h lib/settings.h lib/standards.h lib/timer.h lib/checkstl.h
478478
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -std=c++0x -c -o test/testgarbage.o test/testgarbage.cpp
479479

480480
test/testincompletestatement.o: test/testincompletestatement.cpp lib/cxx11emu.h test/testsuite.h lib/errorlogger.h lib/config.h lib/suppressions.h test/redirect.h lib/library.h lib/path.h lib/mathlib.h lib/token.h lib/valueflow.h lib/tokenize.h lib/tokenlist.h lib/checkother.h lib/check.h lib/settings.h lib/standards.h lib/timer.h

test/testgarbage.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "tokenize.h"
2121
#include "token.h"
2222
#include "checkother.h"
23+
#include "checkstl.h"
2324
#include "settings.h"
2425

2526
extern std::ostringstream errout;
@@ -75,9 +76,13 @@ class TestGarbage : public TestFixture {
7576
tokenizer.tokenize(istr, filename);
7677
tokenizer.simplifyTokenList2();
7778

78-
// TODO: Run checks
79+
// TODO: Run more checks
7980
CheckOther checkOther(&tokenizer, &settings, this);
8081
checkOther.runChecks(&tokenizer, &settings, this);
82+
checkOther.runSimplifiedChecks(&tokenizer, &settings, this);
83+
CheckStl checkStl(&tokenizer, &settings, this);
84+
checkStl.runChecks(&tokenizer, &settings, this);
85+
checkStl.runSimplifiedChecks(&tokenizer, &settings, this);
8186

8287
return tokenizer.tokens()->stringifyList(false, false, false, true, false, 0, 0);
8388
}

0 commit comments

Comments
 (0)