#include <osg/Export>
#include <osg/Referenced>
#include <osg/ref_ptr>
#include <osg/Timer>
#include <osg/Notify>
#include <string>
#include <vector>
#include <list>
#include <fstream>
Namespaces | |
namespace | osgUtx |
Defines | |
#define | OSG_UNITTESTFRAMEWORK 1 |
#define | OSGUTX_BEGIN_TESTSUITE(tsuite) |
Starts a TestSuite singleton function. | |
#define | OSGUTX_ADD_TESTCASE(tfixture, tmethod) |
Adds a test case to a suite object being created in a TestSuite singleton function. | |
#define | OSGUTX_END_TESTSUITE |
Ends a TestSuite singleton function. | |
#define | OSGUTX_TESTSUITE(tsuite) tsuite##_TestSuite() |
Define a TestSuite accessor. | |
#define | OSGUTX_ADD_TESTSUITE(childSuite) s_suite->add( childSuite##_TestSuite() ); |
Adds a suite to a suite - allows composition of test suites. | |
#define | OSGUTX_AUTOREGISTER_TESTSUITE(tsuite) static osgUtx::TestSuiteAutoRegistrationAgent tsuite##_autoRegistrationObj__( tsuite##_TestSuite() ); |
Autoregister a testsuite with the root suite at startup. | |
#define | OSGUTX_AUTOREGISTER_TESTSUITE_AT(tsuite, path) static osgUtx::TestSuiteAutoRegistrationAgent tsuite##_autoRegistrationObj__( tsuite##_TestSuite(), #path ); |
Auto register a testsuite with at designated point in the suite graph at startup. | |
#define | OSGUTX_TEST_F(expr) |
OSGUTX_TEST_F is a convenience macro, analogous to assert(), which will throw an osgUtx::TestFailureX if expr evaluates to false; this should be used to test for failure in a given test, as opposed to an actual error in the test owing to some other reason than the tested code being faulty. | |
#define | OSGUTX_TEST_E(expr) |
OSGUTX_TEST_E is a convenience macro, analogous to assert(), which will throw an osgUtx::TestErrorX if expr evaluates to false; this should be used to test for an error in a given test, as opposed to a failure in the tested code. |
|
|
|
Value: s_suite->add( new osgUtx::TestCase_<tfixture>( \ #tmethod, &tfixture::tmethod ) );
|
|
Adds a suite to a suite - allows composition of test suites.
|
|
Autoregister a testsuite with the root suite at startup.
|
|
Auto register a testsuite with at designated point in the suite graph at startup.
|
|
Value: osgUtx::TestSuite* tsuite##_TestSuite() \ { \ static osg::ref_ptr<osgUtx::TestSuite> s_suite = 0; \ if ( s_suite == 0 ) { \ s_suite = new osgUtx::TestSuite( #tsuite );
|
|
Value: } \
return s_suite.get(); \
}
|
|
Value: if( !(expr) ){ \ std::stringstream ss; \ ss<< #expr <<" error: "<<__FILE__<<", line "<<__LINE__<<std::ends; \ throw osgUtx::TestErrorX(ss.str()); \ } The exception will indicate the file and line number of the failed expression, along with expression itself. |
|
Value: if( !(expr) ){ \ std::stringstream ss; \ ss<< #expr <<" failure: "<<__FILE__<<", line "<<__LINE__<<std::ends; \ throw osgUtx::TestFailureX(ss.str()); \ } The exception will indicate the file and line number of the failed expression, along with expression itself. |
|
Define a TestSuite accessor.
|