@@ -29,31 +29,31 @@ void wifi_set_credential(void)
29
29
nsapi_error_t error;
30
30
31
31
error = iface->set_credentials (NULL , NULL , NSAPI_SECURITY_NONE);
32
- TEST_ASSERT (error == NSAPI_ERROR_PARAMETER);
32
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_PARAMETER, error );
33
33
34
34
error = iface->set_credentials (" " , " " , NSAPI_SECURITY_NONE);
35
- TEST_ASSERT (error == NSAPI_ERROR_PARAMETER);
35
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_PARAMETER, error );
36
36
37
37
error = iface->set_credentials (" OK" , NULL , NSAPI_SECURITY_NONE);
38
- TEST_ASSERT (error == NSAPI_ERROR_OK);
38
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_OK, error );
39
39
40
40
error = iface->set_credentials (" OK" , " " , NSAPI_SECURITY_NONE);
41
- TEST_ASSERT (error == NSAPI_ERROR_OK);
41
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_OK, error );
42
42
43
43
error = iface->set_credentials (" OK" , NULL , NSAPI_SECURITY_WEP);
44
- TEST_ASSERT (error == NSAPI_ERROR_PARAMETER);
44
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_PARAMETER, error );
45
45
46
46
error = iface->set_credentials (" OK" , " " , NSAPI_SECURITY_WEP);
47
- TEST_ASSERT (error == NSAPI_ERROR_PARAMETER);
47
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_PARAMETER, error );
48
48
49
49
error = iface->set_credentials (" OK" , NULL , NSAPI_SECURITY_WPA_WPA2);
50
- TEST_ASSERT (error == NSAPI_ERROR_PARAMETER);
50
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_PARAMETER, error );
51
51
52
52
error = iface->set_credentials (" OK" , " " , NSAPI_SECURITY_WPA_WPA2);
53
- TEST_ASSERT (error == NSAPI_ERROR_PARAMETER);
53
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_PARAMETER, error );
54
54
55
55
error = iface->set_credentials (" OK" , NULL , NSAPI_SECURITY_NONE);
56
- TEST_ASSERT (error == NSAPI_ERROR_OK);
56
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_OK, error );
57
57
58
58
error = iface->set_credentials (" OK" , " 12345678" , NSAPI_SECURITY_WEP);
59
59
TEST_ASSERT ((error == NSAPI_ERROR_OK) || (error == NSAPI_ERROR_UNSUPPORTED));
@@ -65,11 +65,11 @@ void wifi_set_credential(void)
65
65
TEST_ASSERT ((error == NSAPI_ERROR_OK) || (error == NSAPI_ERROR_UNSUPPORTED));
66
66
67
67
error = iface->set_credentials (" OK" , " 12345678" , NSAPI_SECURITY_WPA_WPA2);
68
- TEST_ASSERT (error == NSAPI_ERROR_OK);
68
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_OK, error );
69
69
70
70
error = iface->set_credentials (" OK" , " kUjd0PHHeAqaDoyfcDDEOvbyiVbYMpUHDukGoR6EJZnO5iLzWsfwiM9JQqOngni" , get_security ());
71
- TEST_ASSERT (error == NSAPI_ERROR_OK);
71
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_OK, error );
72
72
73
73
error = iface->set_credentials (" OK" , " kUjd0PHHeAqaDoyfcDDEOvbyiVbYMpUHDukGoR6EJZnO5iLzWsfwiM9JQqOngni8" , get_security ());
74
- TEST_ASSERT (error == NSAPI_ERROR_PARAMETER);
74
+ TEST_ASSERT_EQUAL ( NSAPI_ERROR_PARAMETER, error );
75
75
}
0 commit comments