this is a class for unit testing
This is an UnitTest library. You can use for POST.
UnitTest.cpp
- Committer:
- sPymbed
- Date:
- 2019-09-11
- Revision:
- 3:658ba851ab74
- Parent:
- 2:543a87f138d2
- Child:
- 4:13e7349640c0
File content as of revision 3:658ba851ab74:
#include "UnitTest.h" void UnitTest::start(){ testCount = 1; printf("UnitTest:\n\n"); unitTest.start(); } void UnitTest::end(){ unitTest.stop(); printf("End: %fs\n", unitTest.read()); } void UnitTest::assertOn(int a, int b){ printf("Test %d: ", testCount); if(a == b){ printf("Passed\n\n"); } else { printf("Failed\n"); while(true){ wait(1); } } testCount++; }