From 6b30091ee3af37d7d1224dba4f3f752b6abf17bc Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Sat, 30 Jan 2010 20:05:31 +0000 Subject: [PATCH] improved memory leak test. [SVN r59372] --- test/error_info_test.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/error_info_test.cpp b/test/error_info_test.cpp index d152caa..53a6d12 100644 --- a/test/error_info_test.cpp +++ b/test/error_info_test.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -302,7 +303,7 @@ test_add_tuple() } void -test_lifetime() +test_lifetime1() { int count=0; try @@ -323,6 +324,19 @@ test_lifetime() BOOST_TEST(!count); } +void +test_lifetime2() + { + int count=0; + { + boost::exception_ptr ep; + test_exception e; e<0); + } + BOOST_TEST(!count); + } + bool is_const( int const * ) { @@ -354,7 +368,8 @@ main() test_basic_throw_catch(); test_catch_add_info(); test_add_tuple(); - test_lifetime(); + test_lifetime1(); + test_lifetime2(); test_const(); return boost::report_errors(); }