fork

Fork of cpputest by Rohit Grover

Revision:
2:82161d9e7b36
Parent:
1:4769360130ed
--- a/src/CppUTest/CommandLineTestRunner.cpp	Tue Jun 17 15:52:54 2014 +0100
+++ b/src/CppUTest/CommandLineTestRunner.cpp	Thu Jun 19 08:24:31 2014 +0100
@@ -53,19 +53,19 @@
 	int result = 0;
 	ConsoleTestOutput output;
 
-	// MemoryLeakWarningPlugin memLeakWarn(DEF_PLUGIN_MEM_LEAK);
-	// memLeakWarn.destroyGlobalDetectorAndTurnOffMemoryLeakDetectionInDestructor(true);
-	// TestRegistry::getCurrentRegistry()->installPlugin(&memLeakWarn);
+	MemoryLeakWarningPlugin memLeakWarn(DEF_PLUGIN_MEM_LEAK);
+	memLeakWarn.destroyGlobalDetectorAndTurnOffMemoryLeakDetectionInDestructor(true);
+	TestRegistry::getCurrentRegistry()->installPlugin(&memLeakWarn);
 
 	{
 		CommandLineTestRunner runner(ac, av, &output, TestRegistry::getCurrentRegistry());
 		result = runner.runAllTestsMain();
 	}
 
-	// if (result == 0) {
-	// 	output << memLeakWarn.FinalReport(0);
-	// }
-	// TestRegistry::getCurrentRegistry()->removePluginByName(DEF_PLUGIN_MEM_LEAK);
+	if (result == 0) {
+		output << memLeakWarn.FinalReport(0);
+	}
+	TestRegistry::getCurrentRegistry()->removePluginByName(DEF_PLUGIN_MEM_LEAK);
 	return result;
 }