|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Go to the documentation of this file.
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.
RCP< T > rcpFromPtr(const Ptr< T > &ptr)
Create an RCP<T> from a Ptr<T> object.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
#define TEST_ASSERT(v1)
Assert the given statement is true.
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
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_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails).
Smart reference counting pointer class for automatic garbage collection.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
#define ECHO(statement)
Echo the given statement before it is executed.
Null reference error exception class.
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
Ptr< T > ptrFromRef(T &arg)
Create a pointer to a object from an object reference.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.