Fork of the espurna firmware for `mhsw` switches
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.

21 lines
404 B

  1. #include <Arduino.h>
  2. #include <unity.h>
  3. #include "libs/URL.h"
  4. void test_parse() {
  5. URL url("http://api.thingspeak.com/update");
  6. TEST_ASSERT_EQUAL_STRING("api.thingspeak.com", url.host.c_str());
  7. TEST_ASSERT_EQUAL_STRING("/update", url.path.c_str());
  8. TEST_ASSERT_EQUAL(80, url.port);
  9. }
  10. int main(int argc, char** argv) {
  11. UNITY_BEGIN();
  12. RUN_TEST(test_parse);
  13. UNITY_END();
  14. }