19 Sep
2009
19 Sep
'09
10:24 p.m.
2009/9/15 Василий Старостин
Hi!
I use Boost.Test as testing facility and get "memory leak detected" messages every time this happens. And this is good.
However, Boost.Test doesn't return non-zero error code when leaks detected (as it does this when tests fail).
How can I make my testing program to return non-zero error code if memory leaked?
Because Boost.Test does not contain anything that can test for memory leaks. You might want to use something like Google's tcmalloc and so forth as it can tell you about all that, and you can just add a Boost.Test testcase at the end of the tests to check for memory leaks using it.