Files
espurna/code/test/unit/url/url.cpp
2020-01-29 23:59:39 +03:00

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();
}