Define TEST_METHOD¶
Defined in File pvUnitTest.h
Define Documentation¶
-
TEST_METHOD(klass, method)¶
Run a class method as a test.
Each invocation of TEST_METHOD() constructs a new instance of ‘klass’ on the stack. Thus constructor and destructor can be used for common test setup and tear down.
namespace { // anon struct MyTest { MyTest() { } // setup ~MyTest() { } // tear down void test1() {} void test2() {} }; } // namespace anon MAIN(somename) { testPlan(0); TEST_METHOD(MyTest, test1) TEST_METHOD(MyTest, test2) return testDone(); }