From 08eaa51c78248d0d4526e691a34eb6ff109b383d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 16 Oct 2015 21:05:29 +0100 Subject: Exclude BOOST_TEST_DONT_PRINT_LOG_VALUE code and help output --- slicer/test/compilation.cpp | 19 +++++++++---------- 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 #include -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) { -- cgit v1.2.3