From 0fe2e6ea60c81959ab1cca292f0bd9ec4b53ee32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 25 Nov 2004 18:27:03 +0000 Subject: [PATCH] additional test for release and reset --- mrw/auto_test.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mrw/auto_test.cpp b/mrw/auto_test.cpp index 8c5f4ba..99f525f 100644 --- a/mrw/auto_test.cpp +++ b/mrw/auto_test.cpp @@ -9,6 +9,9 @@ @license LGPL, see file COPYING $Log$ + Revision 1.4 2004/11/25 18:27:03 marc + additional test for release and reset + Revision 1.3 2004/08/28 16:21:25 marc mrw-c++-0.92 (mrw) - new file: version.cpp @@ -63,8 +66,11 @@ public: CPPUNIT_ASSERT(c); strncpy(c, C, sizeof(C)); CPPUNIT_ASSERT(std::string(c)==C); - c.release(); - CPPUNIT_ASSERT(c==0); + mrw::Auto::Free c2(c.release()); + CPPUNIT_ASSERT(c==0 && c2!=0); + CPPUNIT_ASSERT(std::string(c2)==C); + c2.reset(); + CPPUNIT_ASSERT(c2==0); } CPPUNIT_TEST_SUITE(AutoTest); CPPUNIT_TEST(AutoFile);