Skip to content
Snippets Groups Projects
Commit 4c6af80d authored by Jan Trávníček's avatar Jan Trávníček
Browse files

test rvalue_ref

parent 076b43fd
No related branches found
No related tags found
No related merge requests found
#include "UtilityTest.h"
#include <alib/utility>
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( UtilityTest, "bits" );
CPPUNIT_TEST_SUITE_REGISTRATION( UtilityTest );
void UtilityTest::setUp() {
}
void UtilityTest::tearDown() {
}
class Foo {
public:
int bar ( ) {
return 1;
}
};
void UtilityTest::testProperties() {
ext::rvalue_ref < Foo > val ( new Foo );
CPPUNIT_ASSERT ( val->bar ( ) == 1 );
}
#ifndef UTILITY_TEST_H_
#define UTILITY_TEST_H_
#include <cppunit/extensions/HelperMacros.h>
class UtilityTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( UtilityTest );
CPPUNIT_TEST( testProperties );
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
void tearDown();
void testProperties();
};
#endif // UTILITY_TEST_H_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment