diff --git a/rewriter/tests/rewrite_fn_ptr_eq/CMakeLists.txt b/rewriter/tests/rewrite_fn_ptr_eq/CMakeLists.txt index 3cf926439d..d995917889 100644 --- a/rewriter/tests/rewrite_fn_ptr_eq/CMakeLists.txt +++ b/rewriter/tests/rewrite_fn_ptr_eq/CMakeLists.txt @@ -5,6 +5,7 @@ define_shared_lib( define_test( SRCS main.c NEEDS_LD_WRAP + CRITERION_TEST ) define_ia2_wrapper() diff --git a/rewriter/tests/rewrite_fn_ptr_eq/lib.c b/rewriter/tests/rewrite_fn_ptr_eq/lib.c index 7fa4c3758d..2229abbe52 100644 --- a/rewriter/tests/rewrite_fn_ptr_eq/lib.c +++ b/rewriter/tests/rewrite_fn_ptr_eq/lib.c @@ -1,6 +1,8 @@ /* RUN: cat rewrite_fn_ptr_eq_call_gates_1.ld | FileCheck --check-prefix=LINKARGS %s */ +#include +#include #include #include #include @@ -8,8 +10,8 @@ RUN: cat rewrite_fn_ptr_eq_call_gates_1.ld | FileCheck --check-prefix=LINKARGS % // LINKARGS: --wrap=call_fn int call_fn(bin_op fn, int x, int y) { - assert(fn != NULL); + cr_assert(fn != NULL); int res = fn(x, y); - printf("%d\n", res); + cr_log_info("%d\n", res); return res; } diff --git a/rewriter/tests/rewrite_fn_ptr_eq/main.c b/rewriter/tests/rewrite_fn_ptr_eq/main.c index 91064302cd..f8fe55e222 100644 --- a/rewriter/tests/rewrite_fn_ptr_eq/main.c +++ b/rewriter/tests/rewrite_fn_ptr_eq/main.c @@ -1,6 +1,7 @@ /* RUN: cat main.c | FileCheck --match-full-lines --check-prefix=REWRITER %S/main.c */ +#include #include #include #include @@ -22,7 +23,7 @@ struct module { bin_op fn; }; -int main() { +Test(rewrite_fn_ptr_eq, main) { int res; int *y = &res; void *x = NULL;