Browse Source

Merge branch 'add-gtest' into gtest-tests

Daniel Buckmaster 11 năm trước cách đây
mục cha
commit
dcd51d9b98
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      Engine/source/testing/unitTesting.cpp

+ 4 - 2
Engine/source/testing/unitTesting.cpp

@@ -88,8 +88,10 @@ DefineConsoleFunction( runAllUnitTests, int, (),,
    // Release the default listener.
    delete listeners.Release( listeners.default_result_printer() );
 
-   // Add the memory leak tester.
-   listeners.Append( new testing::MemoryLeakDetector );
+   if ( Con::getBoolVariable( "$testing::checkMemoryLeaks", false ) ) {
+      // Add the memory leak tester.
+      listeners.Append( new testing::MemoryLeakDetector );
+   }
 
    // Add the Torque unit test listener.
    listeners.Append( new TorqueUnitTestListener );