mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-03 15:04:17 +01:00
22 lines
404 B
C++
22 lines
404 B
C++
#include <Arduino.h>
|
|
#include <unity.h>
|
|
|
|
#include "libs/URL.h"
|
|
|
|
void test_parse() {
|
|
URL url("http://api.thingspeak.com/update");
|
|
TEST_ASSERT_EQUAL_STRING("api.thingspeak.com", url.host.c_str());
|
|
TEST_ASSERT_EQUAL_STRING("/update", url.path.c_str());
|
|
TEST_ASSERT_EQUAL(80, url.port);
|
|
}
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
UNITY_BEGIN();
|
|
|
|
RUN_TEST(test_parse);
|
|
|
|
UNITY_END();
|
|
|
|
}
|