this is a class for unit testing
This is an UnitTest library. You can use for POST.
UnitTest.h@4:13e7349640c0, 2019-11-20 (annotated)
- Committer:
- sPymbed
- Date:
- Wed Nov 20 13:27:27 2019 +0000
- Revision:
- 4:13e7349640c0
- Parent:
- 3:658ba851ab74
fixed: print line in screen
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sPymbed | 0:b8a9485ea4f3 | 1 | #ifndef UnitTest_h |
sPymbed | 0:b8a9485ea4f3 | 2 | #define UnitTest_h |
sPymbed | 0:b8a9485ea4f3 | 3 | |
sPymbed | 0:b8a9485ea4f3 | 4 | #include "mbed.h" |
sPymbed | 0:b8a9485ea4f3 | 5 | |
sPymbed | 1:652e6df36e5d | 6 | //!Library for unit testing |
sPymbed | 1:652e6df36e5d | 7 | /*! |
sPymbed | 1:652e6df36e5d | 8 | This is an unit test class |
sPymbed | 1:652e6df36e5d | 9 | */ |
sPymbed | 3:658ba851ab74 | 10 | |
sPymbed | 0:b8a9485ea4f3 | 11 | class UnitTest |
sPymbed | 0:b8a9485ea4f3 | 12 | { |
sPymbed | 0:b8a9485ea4f3 | 13 | private: |
sPymbed | 0:b8a9485ea4f3 | 14 | Timer unitTest; |
sPymbed | 0:b8a9485ea4f3 | 15 | unsigned int testCount; |
sPymbed | 0:b8a9485ea4f3 | 16 | |
sPymbed | 0:b8a9485ea4f3 | 17 | public: |
sPymbed | 1:652e6df36e5d | 18 | /** |
sPymbed | 1:652e6df36e5d | 19 | * This is the start point of the unit test |
sPymbed | 1:652e6df36e5d | 20 | */ |
sPymbed | 0:b8a9485ea4f3 | 21 | void start(); |
sPymbed | 1:652e6df36e5d | 22 | |
sPymbed | 1:652e6df36e5d | 23 | /** |
sPymbed | 1:652e6df36e5d | 24 | * This is the end point of the unit test |
sPymbed | 1:652e6df36e5d | 25 | */ |
sPymbed | 0:b8a9485ea4f3 | 26 | void end(); |
sPymbed | 1:652e6df36e5d | 27 | |
sPymbed | 1:652e6df36e5d | 28 | /** |
sPymbed | 1:652e6df36e5d | 29 | * This is a test function |
sPymbed | 1:652e6df36e5d | 30 | */ |
sPymbed | 3:658ba851ab74 | 31 | void assertOn(int, int); |
sPymbed | 0:b8a9485ea4f3 | 32 | }; |
sPymbed | 0:b8a9485ea4f3 | 33 | |
sPymbed | 0:b8a9485ea4f3 | 34 | #endif |