57 using Teuchos::ptrFromRef;
58 using Teuchos::rcpFromPtr;
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);
Dangling reference error exception class.
Null reference error exception class.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
#define TEST_ASSERT(v1)
Assert the given statement is true.
#define ECHO(statement)
Echo the given statement before it is executed.
#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)...
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Ptr< T > ptrFromRef(T &arg)
Create a pointer to a object from an object reference.
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
RCP< T > rcpFromPtr(const Ptr< T > &ptr)
Create an RCP<T> from a Ptr<T> object.
Smart reference counting pointer class for automatic garbage collection.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists...
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.