ESP8266 Treppenlichtsteuerung mit OTA zum Firmware Upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_main.cpp 675B

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include <Arduino.h>
  2. #include <unity.h>
  3. String STR_TO_TEST;
  4. void setUp(void) {
  5. // set stuff up here
  6. STR_TO_TEST = "Hello, world!";
  7. }
  8. void tearDown(void) {
  9. // clean stuff up here
  10. STR_TO_TEST = "";
  11. }
  12. void test_led_builtin_pin_number(void) {
  13. TEST_ASSERT_EQUAL(2, LED_BUILTIN);
  14. }
  15. void test_string_concat(void) {
  16. String hello = "Hello, ";
  17. String world = "world!";
  18. TEST_ASSERT_EQUAL_STRING(STR_TO_TEST.c_str(), (hello + world).c_str());
  19. }
  20. void setup()
  21. {
  22. delay(2000); // service delay
  23. UNITY_BEGIN();
  24. RUN_TEST(test_led_builtin_pin_number);
  25. RUN_TEST(test_string_concat);
  26. UNITY_END(); // stop unit testing
  27. }
  28. void loop()
  29. {
  30. }