this is a class for unit testing
This is an UnitTest library. You can use for POST.
UnitTest.h@1:652e6df36e5d, 2017-11-01 (annotated)
- Committer:
- sPymbed
- Date:
- Wed Nov 01 13:09:48 2017 +0000
- Revision:
- 1:652e6df36e5d
- Parent:
- 0:b8a9485ea4f3
- Child:
- 3:658ba851ab74
added: documentation
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 | 0:b8a9485ea4f3 | 10 | class UnitTest |
sPymbed | 0:b8a9485ea4f3 | 11 | { |
sPymbed | 0:b8a9485ea4f3 | 12 | private: |
sPymbed | 0:b8a9485ea4f3 | 13 | Timer unitTest; |
sPymbed | 0:b8a9485ea4f3 | 14 | unsigned int testCount; |
sPymbed | 0:b8a9485ea4f3 | 15 | |
sPymbed | 0:b8a9485ea4f3 | 16 | public: |
sPymbed | 1:652e6df36e5d | 17 | /** |
sPymbed | 1:652e6df36e5d | 18 | * This is the start point of the unit test |
sPymbed | 1:652e6df36e5d | 19 | */ |
sPymbed | 0:b8a9485ea4f3 | 20 | void start(); |
sPymbed | 1:652e6df36e5d | 21 | |
sPymbed | 1:652e6df36e5d | 22 | /** |
sPymbed | 1:652e6df36e5d | 23 | * This is the end point of the unit test |
sPymbed | 1:652e6df36e5d | 24 | */ |
sPymbed | 0:b8a9485ea4f3 | 25 | void end(); |
sPymbed | 1:652e6df36e5d | 26 | |
sPymbed | 1:652e6df36e5d | 27 | /** |
sPymbed | 1:652e6df36e5d | 28 | * This is a test function |
sPymbed | 1:652e6df36e5d | 29 | */ |
sPymbed | 0:b8a9485ea4f3 | 30 | void assert(int, int); |
sPymbed | 0:b8a9485ea4f3 | 31 | }; |
sPymbed | 0:b8a9485ea4f3 | 32 | |
sPymbed | 0:b8a9485ea4f3 | 33 | #endif |