mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-05 06:26:52 +00:00
Merge pull request #7936 from AgathiyanB/assert-false-macro
Add TEST_FAIL macro for tests
This commit is contained in:
commit
e7700a7d0a
12 changed files with 33 additions and 23 deletions
|
|
@ -702,7 +702,7 @@ void x509_verify(char *crt_file, char *ca_file, char *crl_file,
|
|||
} else if (strcmp(profile_str, "all") == 0) {
|
||||
profile = &profile_all;
|
||||
} else {
|
||||
TEST_ASSERT("Unknown algorithm profile" == 0);
|
||||
TEST_FAIL("Unknown algorithm profile");
|
||||
}
|
||||
|
||||
if (strcmp(verify_callback, "NULL") == 0) {
|
||||
|
|
@ -712,7 +712,7 @@ void x509_verify(char *crt_file, char *ca_file, char *crl_file,
|
|||
} else if (strcmp(verify_callback, "verify_all") == 0) {
|
||||
f_vrfy = verify_all;
|
||||
} else {
|
||||
TEST_ASSERT("No known verify callback selected" == 0);
|
||||
TEST_FAIL("No known verify callback selected");
|
||||
}
|
||||
|
||||
TEST_EQUAL(mbedtls_x509_crt_parse_file(&crt, crt_file), 0);
|
||||
|
|
@ -881,7 +881,7 @@ void mbedtls_x509_dn_gets(char *crt_file, char *entity, char *result_str)
|
|||
} else if (strcmp(entity, "issuer") == 0) {
|
||||
res = mbedtls_x509_dn_gets(buf, 2000, &crt.issuer);
|
||||
} else {
|
||||
TEST_ASSERT("Unknown entity" == 0);
|
||||
TEST_FAIL("Unknown entity");
|
||||
}
|
||||
|
||||
TEST_ASSERT(res != -1);
|
||||
|
|
@ -1006,7 +1006,7 @@ void mbedtls_x509_time_is_past(char *crt_file, char *entity, int result)
|
|||
} else if (strcmp(entity, "valid_to") == 0) {
|
||||
TEST_EQUAL(mbedtls_x509_time_is_past(&crt.valid_to), result);
|
||||
} else {
|
||||
TEST_ASSERT("Unknown entity" == 0);
|
||||
TEST_FAIL("Unknown entity");
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
@ -1030,7 +1030,7 @@ void mbedtls_x509_time_is_future(char *crt_file, char *entity, int result)
|
|||
} else if (strcmp(entity, "valid_to") == 0) {
|
||||
TEST_EQUAL(mbedtls_x509_time_is_future(&crt.valid_to), result);
|
||||
} else {
|
||||
TEST_ASSERT("Unknown entity" == 0);
|
||||
TEST_FAIL("Unknown entity");
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue