Classes | |
| class | UnitTest |
| Base class for unit test objects. More... | |
Namespaces | |
| mudbox | |
| Class: ConvolutionKernel. | |
Macros | |
| #define | MB_START_TEST_OBJECT(testObjName) |
| These macros define a test object that contains unit tests. More... | |
| #define | MB_END_TEST_OBJECT(testObjName) |
| #define | MB_START_DEF_TESTS |
| #define | MB_END_DEF_TESTS }; |
| #define | MB_DECL_TEST(name) |
| #define | MB_DEF_TEST(name) |
| #define | MB_CHECK(condition) |
| #define MB_START_TEST_OBJECT | ( | testObjName | ) |
These macros define a test object that contains unit tests.
To add unit tests to your plugin, put the following boilerplate code in a new .cpp file that gets compiled with your plugin.
#include <UnitTest.h> MB_START_TEST_OBJECT("Tester")
MB_DECL_TEST( TestName )
MB_DECL_TEST( TestName2 )
MB_START_DEF_TESTS
MB_DEF_TEST( TestName )
{
tests here } MB_DEF_TEST( TestName2 ) { tests here assert using MB_CHECK( some boolean expression ) to make sure your code is doing what you think its doing! } MB_END_DEF_TESTS
MB_END_TEST_OBJECT("Tester")
Definition at line 61 of file UnitTest.h.
| #define MB_END_TEST_OBJECT | ( | testObjName | ) |
Definition at line 91 of file UnitTest.h.
| #define MB_START_DEF_TESTS |
Definition at line 95 of file UnitTest.h.
| #define MB_END_DEF_TESTS }; |
Definition at line 102 of file UnitTest.h.
| #define MB_DECL_TEST | ( | name | ) |
Definition at line 107 of file UnitTest.h.
| #define MB_DEF_TEST | ( | name | ) |
Definition at line 121 of file UnitTest.h.
| #define MB_CHECK | ( | condition | ) |
Definition at line 126 of file UnitTest.h.