diff options
author | joergkappes <kappes@math.uni-heidelberg.de> | 2015-03-28 18:20:06 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-05-08 14:28:52 +0200 |
commit | f4dcfd65f2695fd2163109e6577fb61c524c9d5f (patch) | |
tree | fd945b7f3a531ee9b6ea5b1f790b775e0cc20a61 | |
parent | 3f6079b9dc2e3b6f54f512f6eb9c47b913fcd1c7 (diff) | |
download | astra-f4dcfd65f2695fd2163109e6577fb61c524c9d5f.tar.gz astra-f4dcfd65f2695fd2163109e6577fb61c524c9d5f.tar.bz2 astra-f4dcfd65f2695fd2163109e6577fb61c524c9d5f.tar.xz astra-f4dcfd65f2695fd2163109e6577fb61c524c9d5f.zip |
fix memleaks in test
-rw-r--r-- | tests/test_ParallelBeamLineKernelProjector2D.cpp | 2 | ||||
-rw-r--r-- | tests/test_XMLDocument.cpp | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_ParallelBeamLineKernelProjector2D.cpp b/tests/test_ParallelBeamLineKernelProjector2D.cpp index 86bc54f..c56ff37 100644 --- a/tests/test_ParallelBeamLineKernelProjector2D.cpp +++ b/tests/test_ParallelBeamLineKernelProjector2D.cpp @@ -77,6 +77,8 @@ BOOST_FIXTURE_TEST_CASE( testParallelBeamLineKernelProjector2D_Rectangle, TestPa fWeight += pPix[i].m_fWeight; BOOST_CHECK_SMALL(fWeight - 7.13037f, 0.00001f); + + delete[] pPix; } diff --git a/tests/test_XMLDocument.cpp b/tests/test_XMLDocument.cpp index 18e880d..95429cb 100644 --- a/tests/test_XMLDocument.cpp +++ b/tests/test_XMLDocument.cpp @@ -45,6 +45,9 @@ BOOST_AUTO_TEST_CASE( testXMLDocument_Constructor1 ) BOOST_CHECK(root.getName() == "test"); BOOST_CHECK(root.getContent().empty()); + + delete doc; + } BOOST_AUTO_TEST_CASE( testXMLDocument_FileIO ) @@ -61,6 +64,9 @@ BOOST_AUTO_TEST_CASE( testXMLDocument_FileIO ) BOOST_CHECK(root.getName() == "test"); BOOST_CHECK(root.getContent().empty()); + delete doc2; + delete doc; + } BOOST_AUTO_TEST_CASE( testXMLDocument_CreateNodes ) @@ -109,6 +115,8 @@ BOOST_AUTO_TEST_CASE( testXMLDocument_Options ) BOOST_CHECK(root.getOption("opt") == "val"); + delete doc; + } BOOST_AUTO_TEST_CASE( testXMLDocument_List ) |