You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/02/05 22:33:28 UTC
svn commit: r741301 -
/activemq/activemq-cpp/trunk/src/test/decaf/lang/PointerTest.cpp
Author: tabish
Date: Thu Feb 5 21:33:28 2009
New Revision: 741301
URL: http://svn.apache.org/viewvc?rev=741301&view=rev
Log:
Add more tests
Modified:
activemq/activemq-cpp/trunk/src/test/decaf/lang/PointerTest.cpp
Modified: activemq/activemq-cpp/trunk/src/test/decaf/lang/PointerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/decaf/lang/PointerTest.cpp?rev=741301&r1=741300&r2=741301&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/decaf/lang/PointerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/decaf/lang/PointerTest.cpp Thu Feb 5 21:33:28 2009
@@ -94,10 +94,13 @@
// Test Null Initialize
Pointer<TestClassA> nullPointer;
CPPUNIT_ASSERT( nullPointer.get() == NULL );
+ CPPUNIT_ASSERT( nullPointer == NULL );
+ CPPUNIT_ASSERT_NO_THROW( nullPointer.reset( NULL ) );
// Test Value Constructor
Pointer<TestClassA> pointer( thePointer );
CPPUNIT_ASSERT( pointer.get() == thePointer );
+ CPPUNIT_ASSERT( pointer.get() != NULL );
// Test Copy Constructor
Pointer<TestClassA> ctorCopy( pointer );
@@ -122,6 +125,7 @@
Pointer<ExceptionThrowingClass> ex( new ExceptionThrowingClass() );
CPPUNIT_FAIL( "Should Have Thrown." );
} catch(...) {}
+
}
////////////////////////////////////////////////////////////////////////////////
@@ -195,10 +199,12 @@
{
Pointer<TestClassA> copy = ReturnByValue();
+ CPPUNIT_ASSERT( copy.get() != NULL );
}
{
Pointer<TestClassA> copy = ReturnByConstReference();
+ CPPUNIT_ASSERT( copy.get() != NULL );
}
ReturnByConstReference();