speeduino/test/tests/tests_main.cpp

42 lines
825 B
C++
Raw Normal View History

#include <Arduino.h>
#include <unity.h>
#include "test_misc/tests_corrections.h"
#include "test_misc/tests_init.h"
2020-03-15 17:58:01 -07:00
#include "test_misc/tests_tables.h"
#include "test_schedules/test_schedules.h"
#include "test_decoders/test_decoders.h"
2020-03-15 17:58:01 -07:00
void doTests()
{
testInitialisation();
testCorrections();
//testSchedules(); //This is currently causing issues
testDecoders();
2020-03-15 17:58:01 -07:00
testTables();
}
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
// NOTE!!! Wait for >2 secs
// if board doesn't support software reset via Serial.DTR/RTS
delay(2000);
UNITY_BEGIN(); // IMPORTANT LINE!
doTests();
UNITY_END(); // stop unit testing
}
void loop()
{
// Blink to indicate end of test
digitalWrite(LED_BUILTIN, HIGH);
delay(250);
digitalWrite(LED_BUILTIN, LOW);
delay(250);
}