this is a class for unit testing

Dependents:   OS

This is an UnitTest library. You can use for POST.

Revision:
0:b8a9485ea4f3
Child:
2:543a87f138d2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UnitTest.cpp	Wed Nov 01 13:00:17 2017 +0000
@@ -0,0 +1,23 @@
+#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::assert(int a, int b){
+    printf("Test %d: ", testCount);
+    if(a==b){
+        printf("Passed\n\n");
+    } else {
+        printf("Failed\n");
+        while(true){}
+    }
+    testCount++;
+}
\ No newline at end of file