C++ Unit Test framework which allow IDE(Visual Studio) to enable Autocomplete and suggestion etc.
Because most C++ Unit Test Famework use intensive macro IDE and other tools can not be used with Unit Test Framework.
With HMUnit you can use Autocomplete and suggestion. Also you can use refactoring tools such as 'Refactor'
Usage is very simple.
include
#include "Runner.h" // for run
//in main() function
int main(int argCount, char** argVariable) {
new Runner()->run(argCount, argVariable);
}
// you can run it with empty parameter to run all or testcase names with ; separated to run testcases
//in test.cc file
//include next
#include "HMTest.h" // for test
//define fixture
class AFixture :public HMTest {
virtual void setup() {
cout << "setup \n"; } virtual void teardown() { cout << "teardown \n"; } }; //write testcase // write test name after 'namespace' // put fixture name right after public namespace testEqualsOneTwo {class UseFixtureOf : public AFixture { virtual void run() {
AssertEqual(1,2); // put some test. Autocomplete, suggestion and refactoring is work.
}}registerIt;}
download it from
http://www.box.net/shared/bjf64soick
댓글 없음:
댓글 쓰기