diff --git a/tests/libc_newlib/main.c b/tests/libc_newlib/main.c index 11b1bb1327a8bfdf40326b238623b1b03be8ecd9..6136e57fa11bfee616834eed1564ee4af47e4937 100644 --- a/tests/libc_newlib/main.c +++ b/tests/libc_newlib/main.c @@ -58,15 +58,18 @@ static void test_newlib(void) /* * Be sure `iprintf` and `printf` are used when `newlib` is included as * they should be visible in the final elf file for compile time tests + * + * With llvm and samr21-xpro, I could not directly do 'printf == iprintf'. + * But doing `(printf - iprintf) == 0` correctly checked if they are equal. */ #ifdef MODULE_NEWLIB #ifdef MODULE_NEWLIB_NANO /* Nano maps iprintf to printf */ - TEST_ASSERT(iprintf == printf); + TEST_ASSERT_MESSAGE((printf - iprintf) == 0, "iprintf == printf"); #else /* Normal newlib does not */ - TEST_ASSERT(iprintf != printf); + TEST_ASSERT_MESSAGE((printf - iprintf) != 0, "iprintf != printf"); #endif #endif }