diff --git a/test/test_main.cpp b/test/test_main.cpp index e69de29..f170d56 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -0,0 +1,42 @@ +#include +#include + +String STR_TO_TEST; + +void setUp(void) { + // set stuff up here + STR_TO_TEST = "Hello, world!"; +} + +void tearDown(void) { + // clean stuff up here + STR_TO_TEST = ""; +} + + +void test_led_builtin_pin_number(void) { + TEST_ASSERT_EQUAL(2, LED_BUILTIN); +} + + +void test_string_concat(void) { + String hello = "Hello, "; + String world = "world!"; + TEST_ASSERT_EQUAL_STRING(STR_TO_TEST.c_str(), (hello + world).c_str()); +} + + +void setup() +{ + delay(2000); // service delay + UNITY_BEGIN(); + + RUN_TEST(test_led_builtin_pin_number); + RUN_TEST(test_string_concat); + + UNITY_END(); // stop unit testing +} + +void loop() +{ +} \ No newline at end of file