summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2015-02-12 14:11:41 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-02-12 19:07:57 +0100
commit28eafc83094cec28d18d73a4c3465be7a6238c29 (patch)
tree37da3208440507947fba44eac660e38fe49ed5e1
parentdc6289c4ac8790d79f9ac3a673d227e471041cca (diff)
downloadcmocka-28eafc83094cec28d18d73a4c3465be7a6238c29.tar.gz
cmocka-28eafc83094cec28d18d73a4c3465be7a6238c29.tar.bz2
cmocka-28eafc83094cec28d18d73a4c3465be7a6238c29.zip
cmocka: examples: Fix assert macros usage
Replace used macros with more suitable for given context. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--example/calculator_test.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/example/calculator_test.c b/example/calculator_test.c
index a2dd21d..ab8cad8 100644
--- a/example/calculator_test.c
+++ b/example/calculator_test.c
@@ -159,10 +159,7 @@ static void test_find_operator_function_by_string_null_string(void **state) {
static void test_find_operator_function_by_string_valid_null_functions(void **state) {
(void) state; /* unused */
- assert_int_equal(
- cast_ptr_to_largest_integral_type(
- find_operator_function_by_string(0, NULL, "test")),
- 0);
+ assert_null(find_operator_function_by_string(0, NULL, "test"));
}
/* Ensure find_operator_function_by_string() returns NULL when searching for
@@ -176,12 +173,8 @@ static void test_find_operator_function_by_string_not_found(void **state) {
(void) state; /* unused */
- assert_int_equal(
- cast_ptr_to_largest_integral_type(
- find_operator_function_by_string(array_length(operator_functions),
- operator_functions,
- "test")),
- 0);
+ assert_null(find_operator_function_by_string(
+ array_length(operator_functions), operator_functions, "test"));
}
/* Ensure find_operator_function_by_string() returns the correct function when