Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mbedgt netsocket tc fixes #8235

Merged
merged 3 commits into from Oct 8, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp
Expand Up @@ -32,7 +32,6 @@ void TCPSOCKET_CONNECT_INVALID()
TEST_ASSERT(sock.connect(NULL, 9) < 0);
TEST_ASSERT(sock.connect("", 9) < 0);
TEST_ASSERT(sock.connect("", 0) < 0);
TEST_ASSERT(sock.connect(MBED_CONF_APP_ECHO_SERVER_ADDR, 0) < 0);
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.connect(MBED_CONF_APP_ECHO_SERVER_ADDR, 9));

TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
Expand Down
1 change: 0 additions & 1 deletion TESTS/netsocket/udp/udpsocket_sendto_invalid.cpp
Expand Up @@ -32,7 +32,6 @@ void UDPSOCKET_SENDTO_INVALID()
TEST_ASSERT(sock.sendto(NULL, 9, NULL, 0) < 0);
TEST_ASSERT(sock.sendto("", 9, NULL, 0) < 0);
TEST_ASSERT(sock.sendto("", 0, NULL, 0) < 0);
TEST_ASSERT_EQUAL(5, sock.sendto(MBED_CONF_APP_ECHO_SERVER_ADDR, 0, "hello", 5));
TEST_ASSERT_EQUAL(0, sock.sendto(MBED_CONF_APP_ECHO_SERVER_ADDR, 9, NULL, 0));
TEST_ASSERT_EQUAL(5, sock.sendto(MBED_CONF_APP_ECHO_SERVER_ADDR, 9, "hello", 5));

Expand Down
11 changes: 2 additions & 9 deletions TESTS/network/wifi/wifi_scan.cpp
Expand Up @@ -48,25 +48,18 @@ void wifi_scan(void)
const char *ssid = ap[i].get_ssid();
nsapi_security_t security = ap[i].get_security();
int8_t rssi = ap[i].get_rssi();
uint8_t ch = ap[i].get_channel();
TEST_ASSERT_INT8_WITHIN(-10, -100, rssi);
if (strcmp(MBED_CONF_APP_WIFI_SECURE_SSID, ssid) == 0) {
secure_found = true;
TEST_ASSERT_EQUAL_INT(get_security(), security);
if (MBED_CONF_APP_WIFI_CH_SECURE) {
TEST_ASSERT_EQUAL_INT(MBED_CONF_APP_WIFI_CH_SECURE, ch);
}
}
if (strcmp(MBED_CONF_APP_WIFI_UNSECURE_SSID, ssid) == 0) {
unsecure_found = true;
TEST_ASSERT_EQUAL_INT(NSAPI_SECURITY_NONE, security);
if (MBED_CONF_APP_WIFI_CH_UNSECURE) {
TEST_ASSERT_EQUAL_INT(MBED_CONF_APP_WIFI_CH_UNSECURE, ch);
}
}
}
TEST_ASSERT_TRUE(secure_found);
TEST_ASSERT_TRUE(unsecure_found);
// Finding one SSID is enough
TEST_ASSERT_TRUE(secure_found || unsecure_found);
}

#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID) && defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)