From 9e7108a61df0e38ffa647c510f961297dd44e676 Mon Sep 17 00:00:00 2001 From: Craig Smith Date: Mon, 12 Mar 2018 14:45:13 -0500 Subject: [PATCH] Remove the // from leak detection output so it will cause test failures now. TypedTemplatedLiterals.via is the last remaining leak in the Vireo test suite, but it is in a feature not currently generated by DFIR and only used internally (and this usage does not cause the leak.) Modify the test to avoid the leak, but with a TO-DO to address it in the future. (Git issue #378) --- source/core/TypeAndDataManager.cpp | 2 +- test-it/ViaTests/TypedTemplatedLiterals.via | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/TypeAndDataManager.cpp b/source/core/TypeAndDataManager.cpp index 187de4938..d0081f7ef 100644 --- a/source/core/TypeAndDataManager.cpp +++ b/source/core/TypeAndDataManager.cpp @@ -85,7 +85,7 @@ void TypeManager::PrintMemoryStat(ConstCStr message, Boolean bLast) if (bLast && (_totalAllocations == 1) && (_totalAQAllocated == sizeof(TypeManager))) { // If bLast is true then silence is success. } else { - gPlatform.IO.Printf("//Allocations %4d, AQCount %5zd, ShareTypes %d (%s)\n", (int)_totalAllocations, _totalAQAllocated, _typesShared, message); + gPlatform.IO.Printf("LEAKS: Allocations %4d, AQCount %5zd, ShareTypes %d (%s)\n", (int)_totalAllocations, _totalAQAllocated, _typesShared, message); } #endif } diff --git a/test-it/ViaTests/TypedTemplatedLiterals.via b/test-it/ViaTests/TypedTemplatedLiterals.via index 8922a2254..d16edd8f1 100644 --- a/test-it/ViaTests/TypedTemplatedLiterals.via +++ b/test-it/ViaTests/TypedTemplatedLiterals.via @@ -19,7 +19,7 @@ start( dv(VirtualInstrument ( Println(TestPointGeneric) Println(TestPointInt8) Println(TestPointInt32) - Println(TestPointComplexDouble) + Println(TestPointComplexDouble<()>) // !!! without the <()> arg, this leaks! TODO(spathiwa) investigate Println(TestPointInt8_2_3) Println(TestPointInt8<(2 3)>)