80 Ptr<A> a_ptr = a_rcp.ptr();
81 Ptr<const A> ca_ptr = a_ptr.getConst();
89 ECHO(Ptr<A> a_ptr = a_rcp.ptr());
100 TEST_THROW(a_ptr.getRawPtr(), DanglingReferenceError);
101 TEST_THROW(a_rcp2.getRawPtr(), DanglingReferenceError);
#define TEST_ASSERT(v1)
Assert the given statement is true.
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails).
#define ECHO(statement)
Echo the given statement before it is executed.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
Smart reference counting pointer class for automatic garbage collection.
Dangling reference error exception class.
Null reference error exception class.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
Ptr< T > ptrFromRef(T &arg)
Create a pointer to a object from an object reference.
Smart reference counting pointer class for automatic garbage collection.
RCP< T > rcpFromPtr(const Ptr< T > &ptr)
Create an RCP<T> from a Ptr<T> object.
bool is_null(const boost::shared_ptr< T > &p)
Returns true if p.get()==NULL.
bool nonnull(const boost::shared_ptr< T > &p)
Returns true if p.get()!=NULL.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.