activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r741107 - /activemq/activemq-cpp/trunk/src/test/decaf/lang/PointerTest.cpp
Date Thu, 05 Feb 2009 14:29:18 GMT
Author: tabish
Date: Thu Feb  5 14:29:18 2009
New Revision: 741107

URL: http://svn.apache.org/viewvc?rev=741107&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=741107&r1=741106&r2=741107&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 14:29:18 2009
@@ -73,6 +73,15 @@
 };
 
 ////////////////////////////////////////////////////////////////////////////////
+class ExceptionThrowingClass {
+public:
+
+    ExceptionThrowingClass() {
+        throw std::bad_alloc();
+    }
+};
+
+////////////////////////////////////////////////////////////////////////////////
 struct X {
     Pointer<X> next;
 };
@@ -108,6 +117,11 @@
     p->next = Pointer<X>( new X );
     p = p->next;
     CPPUNIT_ASSERT( !p->next );
+
+    try{
+        Pointer<ExceptionThrowingClass> ex( new ExceptionThrowingClass() );
+        CPPUNIT_FAIL( "Should Have Thrown." );
+    } catch(...) {}
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message