Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********************************* Includes **********************************/
- #include "Arduino.h"
- #include "Blinky.h"
- #include <SimpleTest.h>
- /****************************** Example settings *****************************/
- /**************************** Constants and Types ****************************/
- /********************************* Variables *********************************/
- static unsigned int requested_delay;
- /************************* Local Function Prototypes *************************/
- /***************************** Exported Functions ****************************/
- SimpleTest_Initialize();
- SimpleTest_CreateTest(TestExample)
- {
- Blinky_BlinkOnce();
- SimpleTest_AssertInteger(requested_delay, 100, "Not correct delay requested!");
- }
- SimpleTest_FinalizeTest()
- static char* runTests()
- {
- SimpleTest_RunTest(TestExample);
- return NULL;
- }
- int main(int argc, char **argv)
- {
- const char* testsResult = runTests();
- printf("%s\n", (testsResult == NULL) ? "All tests passed" : testsResult);
- printf("Tests run: %d\n", SimpleTestCounter);
- return (testsResult != NULL);
- }
- /****************************** Local Functions ******************************/
- void delay(unsigned long milliseconds)
- {
- requested_delay = milliseconds;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement