From 6c47a8b3c639b335144668541c55889f405a6f89 Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Tue, 13 Dec 2016 15:57:45 +0100 Subject: [PATCH] Add leak checking to unit tests. (EventBookkeeperTPCnv-00-01-14) * Tagging EventBookkeeperTPCnv-00-01-14. * Add leak checking to unit tests. 2016-08-11 scott snyder <snyder@bnl.gov> * Tagging EventBookkeeperTPCnv-00-01-13. * endreq -> endmsg. --- Event/EventBookkeeperTPCnv/src/EventBookkeeperCnv_p1.cxx | 2 +- Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p1_test.cxx | 2 ++ Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p2_test.cxx | 2 ++ Event/EventBookkeeperTPCnv/test/SkimDecisionCnv_p1_test.cxx | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Event/EventBookkeeperTPCnv/src/EventBookkeeperCnv_p1.cxx b/Event/EventBookkeeperTPCnv/src/EventBookkeeperCnv_p1.cxx index 403b2f282b7..9d099207d76 100644 --- a/Event/EventBookkeeperTPCnv/src/EventBookkeeperCnv_p1.cxx +++ b/Event/EventBookkeeperTPCnv/src/EventBookkeeperCnv_p1.cxx @@ -11,7 +11,7 @@ #include "EventBookkeeperTPCnv/EventBookkeeperCnv_p1.h" void EventBookkeeperCnv_p1::transToPers(const EventBookkeeper* trans, EventBookkeeper_p1* pers, MsgStream &log) { - log << MSG::ERROR << "EventBookkeeperCnv_p1::transToPers should never be called. There is a mistake." << endreq; + log << MSG::ERROR << "EventBookkeeperCnv_p1::transToPers should never be called. There is a mistake." << endmsg; pers->m_nWeightedAcceptedEvents = trans->getNWeightedAcceptedEvents(); pers->m_nAcceptedEvents = trans->getNAcceptedEvents(); pers->m_cycle = trans->getCycle(); diff --git a/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p1_test.cxx b/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p1_test.cxx index 1cdcbd182e7..fbcdbf42fb4 100644 --- a/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p1_test.cxx +++ b/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p1_test.cxx @@ -15,6 +15,7 @@ #include "EventBookkeeperTPCnv/EventBookkeeperCnv_p1.h" #include "CxxUtils/StrFormat.h" #include "CxxUtils/make_unique.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -76,6 +77,7 @@ std::unique_ptr<EventBookkeeper> make (int o) void test1() { std::cout << "test1\n"; + Athena_test::Leakcheck check; std::unique_ptr<EventBookkeeper> trans1 = make(1); trans1->AddChild (make(2).release()); diff --git a/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p2_test.cxx b/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p2_test.cxx index 892adc646b6..2a5c1f73816 100644 --- a/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p2_test.cxx +++ b/Event/EventBookkeeperTPCnv/test/EventBookkeeperCnv_p2_test.cxx @@ -15,6 +15,7 @@ #include "EventBookkeeperTPCnv/EventBookkeeperCnv_p2.h" #include "CxxUtils/StrFormat.h" #include "CxxUtils/make_unique.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -73,6 +74,7 @@ std::unique_ptr<EventBookkeeper> make (int o) void test1() { std::cout << "test1\n"; + Athena_test::Leakcheck check; std::unique_ptr<EventBookkeeper> trans1 = make(1); trans1->AddChild (make(2).release()); diff --git a/Event/EventBookkeeperTPCnv/test/SkimDecisionCnv_p1_test.cxx b/Event/EventBookkeeperTPCnv/test/SkimDecisionCnv_p1_test.cxx index 3c048f85e54..fb0b4b16ff0 100644 --- a/Event/EventBookkeeperTPCnv/test/SkimDecisionCnv_p1_test.cxx +++ b/Event/EventBookkeeperTPCnv/test/SkimDecisionCnv_p1_test.cxx @@ -14,6 +14,7 @@ #undef NDEBUG #include "EventBookkeeperTPCnv/SkimDecisionCnv_p1.h" #include "CxxUtils/StrFormat.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -42,6 +43,7 @@ void testit (const SkimDecision& trans1) void test1() { std::cout << "test1\n"; + Athena_test::Leakcheck check; SkimDecision trans1; trans1.setName ("foo"); -- GitLab