Next: assertions equality, Previous: assertions generic, Up: assertions [Contents][Index]
Assert that the ASCIIZ string expected equals the ASCIIZ string result; the
comparison is performed with the standard function strcmp(). If the strings are equal: just
return. Otherwise raise an exception of type
cctests_condition_assertion_expected_asciiz_t by performing a non–local exit to L.
When the optional argument message and the following arguments are used: a dynamically
allocated string is formatted using message as template and printf() format specifiers;
this string is used as description message for the assertion violation.
Assert that the first result_len octets in the ASCII string expected equal the first
result_len octets in the ASCII string result; the comparison is performed with the
standard function strncmp(). If the strings are equal: just return. Otherwise raise an
exception of type cctests_condition_assertion_expected_ascii_t by performing a non–local
exit to L.
When the optional argument message and the following arguments are used: a dynamically
allocated string is formatted using message as template and printf() format specifiers;
this string is used as description message for the assertion violation.
Here some usage examples:
void
test_1_1 (cce_destination_t L)
{
cctests_assert_asciiz(L, "hello", "ciao");
}
Next: assertions equality, Previous: assertions generic, Up: assertions [Contents][Index]
This document describes version 0.4.1-devel.1 of CCTests.