From 1ea44b631a4dc19813c5c2a1b366b65bbb805e47 Mon Sep 17 00:00:00 2001 From: "Mrozek, Michal" Date: Mon, 30 Apr 2018 16:05:58 +0200 Subject: [PATCH] Add debug message to inform what to do when memory leak is detected. Change-Id: I08c8ce33c2edc337e878acc16d6fd6acfffa33a9 --- unit_tests/memory_leak_listener.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unit_tests/memory_leak_listener.cpp b/unit_tests/memory_leak_listener.cpp index 9a1c22b9de..b1e4ab42b9 100644 --- a/unit_tests/memory_leak_listener.cpp +++ b/unit_tests/memory_leak_listener.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -52,7 +52,7 @@ void MemoryLeakListener::OnTestEnd(const TestInfo &testInfo) { EXPECT_EQ(MemoryManagement::indexAllocation.load(), MemoryManagement::indexDeallocation.load()); } else if (MemoryManagement::fastEventsAllocatedCount != MemoryManagement::fastEventsDeallocatedCount) { auto leak = MemoryManagement::detectLeaks(); - EXPECT_EQ(leak, (int)MemoryManagement::failingAllocation); + EXPECT_EQ(leak, (int)MemoryManagement::failingAllocation) << "To locate call stack, change the value of captureCallStacks to true"; } MemoryManagement::fastEventsAllocatedCount = 0; MemoryManagement::fastEventsDeallocatedCount = 0;