From fa7645ec71b013a613a495915253021283d0b636 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 30 Sep 2014 08:36:55 +0200 Subject: [PATCH] Added CheckStl to garabage code testing. --- Makefile | 2 +- test/testgarbage.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0db9a4571..25b3b2ce8 100644 --- a/Makefile +++ b/Makefile @@ -474,7 +474,7 @@ test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/cxx11emu.h lib/toke 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 $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -std=c++0x -c -o test/testfilelister.o test/testfilelister.cpp -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 +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 $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -std=c++0x -c -o test/testgarbage.o test/testgarbage.cpp 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 diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index 0abdeeef1..95b9803ce 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -20,6 +20,7 @@ #include "tokenize.h" #include "token.h" #include "checkother.h" +#include "checkstl.h" #include "settings.h" extern std::ostringstream errout; @@ -75,9 +76,13 @@ private: tokenizer.tokenize(istr, filename); tokenizer.simplifyTokenList2(); - // TODO: Run checks + // TODO: Run more checks CheckOther checkOther(&tokenizer, &settings, this); checkOther.runChecks(&tokenizer, &settings, this); + checkOther.runSimplifiedChecks(&tokenizer, &settings, this); + CheckStl checkStl(&tokenizer, &settings, this); + checkStl.runChecks(&tokenizer, &settings, this); + checkStl.runSimplifiedChecks(&tokenizer, &settings, this); return tokenizer.tokens()->stringifyList(false, false, false, true, false, 0, 0); }