additional test for release and reset

This commit is contained in:
Marc Wäckerlin
2004-11-25 18:27:03 +00:00
parent 7fd9fbc634
commit 0fe2e6ea60

View File

@@ -9,6 +9,9 @@
@license LGPL, see file <a href="license.html">COPYING</a>
$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<char*>::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);