Added HTTP and NTP test to autodetection pool

pull/900/head
Przemek Wirkus 2015-01-30 09:31:21 +00:00
parent bcfbc3575d
commit 605ee4a0b1
2 changed files with 17 additions and 14 deletions

View File

@ -8,8 +8,12 @@ namespace {
const int BUFFER_SIZE = 512;
}
int main()
{
int main() {
TEST_TIMEOUT(15);
TEST_HOSTTEST(default_auto);
TEST_DESCRIPTION(HTTP client hello world);
TEST_START("NET_7");
char http_request_buffer[BUFFER_SIZE + 1] = {0};
HTTPClient http;
EthernetInterface eth;
@ -31,8 +35,7 @@ int main()
if (result == false) {
eth.disconnect();
notify_completion(false);
exit(ret);
TEST_RESULT(false);
}
}
@ -56,11 +59,9 @@ int main()
if (result == false) {
eth.disconnect();
notify_completion(false);
exit(ret);
TEST_RESULT(false);
}
}
eth.disconnect();
notify_completion(true);
return 0;
TEST_RESULT(true);
}

View File

@ -3,8 +3,12 @@
#include "EthernetInterface.h"
#include "NTPClient.h"
int main()
{
int main() {
TEST_TIMEOUT(15);
TEST_HOSTTEST(default_auto);
TEST_DESCRIPTION(NTP client);
TEST_START("NET_8");
EthernetInterface eth;
NTPClient ntp;
eth.init(); //Use DHCP
@ -27,11 +31,9 @@ int main()
}
if (result == false) {
notify_completion(false);
exit(ret);
TEST_RESULT(false);
}
}
eth.disconnect();
notify_completion(true);
return 0;
TEST_RESULT(true);
}