Add debug message to inform what to do when memory leak is detected.

Change-Id: I08c8ce33c2edc337e878acc16d6fd6acfffa33a9
This commit is contained in:
Mrozek, Michal 2018-04-30 16:05:58 +02:00
parent 081d976d07
commit 1ea44b631a
1 changed files with 2 additions and 2 deletions

View File

@ -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;