From 23921c7889523907a89bdd90343e135d2cd2a75a Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 1 Oct 2014 17:52:28 +0000 Subject: [PATCH] [Test] Run 'appdelete' at end of GTest tests This makes it easier to find memory leaks when using Valgrind by suppressing false positives associated with data cached by Cantera. --- test/kinetics/pdep.cpp | 4 +++- test/thermo/nasapoly.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/kinetics/pdep.cpp b/test/kinetics/pdep.cpp index d4292c71d..bccfe67a9 100644 --- a/test/kinetics/pdep.cpp +++ b/test/kinetics/pdep.cpp @@ -230,5 +230,7 @@ int main(int argc, char** argv) { printf("Running main() from pdep.cpp\n"); testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + int result = RUN_ALL_TESTS(); + Cantera::appdelete(); + return result; } diff --git a/test/thermo/nasapoly.cpp b/test/thermo/nasapoly.cpp index 87a033913..ae310fc20 100644 --- a/test/thermo/nasapoly.cpp +++ b/test/thermo/nasapoly.cpp @@ -148,5 +148,7 @@ int main(int argc, char** argv) { printf("Running main() from nasapoly.cpp\n"); testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + int result = RUN_ALL_TESTS(); + Cantera::appdelete(); + return result; }