diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-10-16 21:05:29 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-10-16 21:05:29 +0100 |
commit | 08eaa51c78248d0d4526e691a34eb6ff109b383d (patch) | |
tree | 08ea0490778b4ee9d074069b52c21bdc2ea11ee2 | |
parent | Improve test coverage. (diff) | |
download | slicer-08eaa51c78248d0d4526e691a34eb6ff109b383d.tar.bz2 slicer-08eaa51c78248d0d4526e691a34eb6ff109b383d.tar.xz slicer-08eaa51c78248d0d4526e691a34eb6ff109b383d.zip |
Exclude BOOST_TEST_DONT_PRINT_LOG_VALUE code and help output
-rw-r--r-- | slicer/test/compilation.cpp | 19 | ||||
-rw-r--r-- | slicer/tool/slicer.cpp | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/slicer/test/compilation.cpp b/slicer/test/compilation.cpp index cc5d2e5..702b48d 100644 --- a/slicer/test/compilation.cpp +++ b/slicer/test/compilation.cpp @@ -4,13 +4,9 @@ #include <types.h> #include <slicer/modelParts.h> -namespace std { - ostream & operator<<(ostream & strm, const type_info & ti) - { - strm << ti.name(); - return strm; - } -} +// LCOV_EXCL_START +BOOST_TEST_DONT_PRINT_LOG_VALUE(std::type_info); +// LCOV_EXCL_STOP #define TypeTest(Var, Expr, Explicit, Expected) \ Var obj = Expr; \ @@ -23,9 +19,12 @@ namespace std { Slicer::ModelPartPtr autoPtrMpp = Slicer::ModelPartFor(&obj); \ BOOST_REQUIRE_EQUAL(Slicer::Expected, autoPtrMpp->GetType()); \ \ - BOOST_TEST_MESSAGE(typeid(*mpp.get())); \ - BOOST_REQUIRE_EQUAL(typeid(*mpp.get()), typeid(*autoMpp.get())); \ - BOOST_REQUIRE_EQUAL(typeid(*mpp.get()), typeid(*autoPtrMpp.get())); + auto mppvalue = mpp.get(); \ + auto amppvalue = mpp.get(); \ + auto apmppvalue = mpp.get(); \ + BOOST_TEST_CHECKPOINT(typeid(*mppvalue).name()); \ + BOOST_REQUIRE_EQUAL(typeid(*mppvalue), typeid(*amppvalue)); \ + BOOST_REQUIRE_EQUAL(typeid(*mppvalue), typeid(*apmppvalue)); #define StackTypeTest(Var, Explicit, Expected) \ TypeTest(Var, Var(), Explicit, Expected) diff --git a/slicer/tool/slicer.cpp b/slicer/tool/slicer.cpp index bc6aa75..b202642 100644 --- a/slicer/tool/slicer.cpp +++ b/slicer/tool/slicer.cpp @@ -26,8 +26,10 @@ main(int argc, char ** argv) po::notify(vm); if (vm.count("help") || slice.empty() || cpp.empty()) { + // LCOV_EXCL_START std::cout << opts << std::endl; return 1; + // LCOV_EXCL_STOP } Slicer::Slicer::Args args; for(const auto & include : includes) { |