From e63cda6f13f3d7725265491aeb388185776b77e0 Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Tue, 13 Dec 2016 16:18:09 +0100 Subject: [PATCH] Add leak checking to unit tests. (eflowEventTPCnv-00-01-14) * Tagging eflowEventTPCnv-00-01-14. * Add leak checking to unit tests. --- .../eflowEventTPCnv/test/eflowObjectCnv_p1_test.cxx | 10 ++++++++++ .../eflowEventTPCnv/test/eflowObjectCnv_p2_test.cxx | 10 ++++++++++ .../eflowEventTPCnv/test/eflowObjectCnv_p3_test.cxx | 12 +++++++++++- .../eflowEventTPCnv/test/eflowObjectCnv_p4_test.cxx | 10 ++++++++++ .../eflowEventTPCnv/test/eflowObjectCnv_p5_test.cxx | 10 ++++++++++ .../test/eflowObjectContainerCnv_p1_test.cxx | 10 ++++++++++ .../test/eflowObjectContainerCnv_p2_test.cxx | 10 ++++++++++ .../test/eflowObjectContainerCnv_p3_test.cxx | 10 ++++++++++ .../test/eflowObjectContainerCnv_p4_test.cxx | 10 ++++++++++ .../test/eflowObjectContainerCnv_p5_test.cxx | 10 ++++++++++ 10 files changed, 101 insertions(+), 1 deletion(-) diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p1_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p1_test.cxx index 070b0804e7e..dc07862958c 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p1_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p1_test.cxx @@ -15,6 +15,7 @@ #include "eflowEventTPCnv/eflowObjectCnv_p1.h" #include "SGTools/TestStore.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -77,6 +78,15 @@ void testit (const eflowObject& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObject trans1; trans1.setE (100.5); diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p2_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p2_test.cxx index 362d5da62f6..26b34463215 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p2_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p2_test.cxx @@ -15,6 +15,7 @@ #include "eflowEventTPCnv/eflowObjectCnv_p2.h" #include "SGTools/TestStore.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -77,6 +78,15 @@ void testit (const eflowObject& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObject trans1; trans1.setE (100.5); diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p3_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p3_test.cxx index a8cddf554d5..790e742af33 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p3_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p3_test.cxx @@ -15,6 +15,7 @@ #include "eflowEventTPCnv/eflowObjectCnv_p3.h" #include "SGTools/TestStore.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -74,7 +75,16 @@ void testit (const eflowObject& trans1) void test1() { - std::cout << "test1\n"; + std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObject trans1; trans1.setE (100.5); diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p4_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p4_test.cxx index 125c40705c7..5b83be84b95 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p4_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p4_test.cxx @@ -15,6 +15,7 @@ #include "eflowEventTPCnv/eflowObjectCnv_p4.h" #include "SGTools/TestStore.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -75,6 +76,15 @@ void testit (const eflowObject& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObject trans1; trans1.setE (100.5); diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p5_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p5_test.cxx index 8ed88228568..8ba4e54ad4a 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p5_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectCnv_p5_test.cxx @@ -15,6 +15,7 @@ #include "eflowEventTPCnv/eflowObjectCnv_p5.h" #include "SGTools/TestStore.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -75,6 +76,15 @@ void testit (const eflowObject& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObject trans1; trans1.setE (100.5); diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p1_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p1_test.cxx index 99f8821d3cd..6d5d791264f 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p1_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p1_test.cxx @@ -16,6 +16,7 @@ #include "SGTools/TestStore.h" #include "CxxUtils/make_unique.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -100,6 +101,15 @@ void testit (const eflowObjectContainer& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObjectContainer trans1; for (int i=0; i < 10; i++) { diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p2_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p2_test.cxx index 43043a3cde3..748c4d5c86c 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p2_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p2_test.cxx @@ -16,6 +16,7 @@ #include "SGTools/TestStore.h" #include "CxxUtils/make_unique.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -100,6 +101,15 @@ void testit (const eflowObjectContainer& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObjectContainer trans1; for (int i=0; i < 10; i++) { diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p3_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p3_test.cxx index 5a22c368ce9..72cfb6b46a0 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p3_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p3_test.cxx @@ -16,6 +16,7 @@ #include "SGTools/TestStore.h" #include "CxxUtils/make_unique.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -98,6 +99,15 @@ void testit (const eflowObjectContainer& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObjectContainer trans1; for (int i=0; i < 10; i++) { diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p4_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p4_test.cxx index 3c8efccf517..a63168a52b4 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p4_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p4_test.cxx @@ -16,6 +16,7 @@ #include "SGTools/TestStore.h" #include "CxxUtils/make_unique.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -98,6 +99,15 @@ void testit (const eflowObjectContainer& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObjectContainer trans1; for (int i=0; i < 10; i++) { diff --git a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p5_test.cxx b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p5_test.cxx index 7f5fd9ed991..ddd5d84438c 100644 --- a/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p5_test.cxx +++ b/Reconstruction/eflowEventTPCnv/test/eflowObjectContainerCnv_p5_test.cxx @@ -16,6 +16,7 @@ #include "SGTools/TestStore.h" #include "CxxUtils/make_unique.h" #include "CLHEP/Vector/ThreeVector.h" +#include "TestTools/leakcheck.h" #include <cassert> #include <iostream> @@ -98,6 +99,15 @@ void testit (const eflowObjectContainer& trans1) void test1() { std::cout << "test1\n"; + // Get proxies created outside of leak checking. + ElementLink<CaloClusterContainer> foo ("foo", 0); + ElementLink<CaloClusterContainer> bar ("bar", 0); + ElementLink<Rec::TrackParticleContainer> aaa ("aaa", 0); + ElementLink<Rec::TrackParticleContainer> bbb ("bbb", 0); + ElementLink<Rec::TrackParticleContainer> ccc ("ccc", 0); + ElementLink<Analysis::MuonContainer> aa ("aa", 0); + ElementLink<VxContainer> bb ("bb", 0); + Athena_test::Leakcheck check; eflowObjectContainer trans1; for (int i=0; i < 10; i++) { -- GitLab