From: Ivan Grokhotkov Date: Wed, 27 Jun 2018 06:47:05 +0000 (+0800) Subject: newlib: fix unit test for psram config X-Git-Tag: v3.2-beta1~391^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81ce7e4afa6dcdd3540bf0bab1d1b1b1da6af161;p=esp-idf newlib: fix unit test for psram config --- diff --git a/components/newlib/test/test_newlib.c b/components/newlib/test/test_newlib.c index 2836fc3d27..10d81e1630 100644 --- a/components/newlib/test/test_newlib.c +++ b/components/newlib/test/test_newlib.c @@ -124,15 +124,20 @@ static bool fn_in_rom(void *fn, const char *name) TEST_CASE("check if ROM or Flash is used for functions", "[newlib]") { -#ifdef CONFIG_NEWLIB_NANO_FORMAT +#if defined(CONFIG_NEWLIB_NANO_FORMAT) && !defined(CONFIG_SPIRAM_SUPPORT) TEST_ASSERT(fn_in_rom(printf, "printf")); TEST_ASSERT(fn_in_rom(sscanf, "sscanf")); #else TEST_ASSERT_FALSE(fn_in_rom(printf, "printf")); TEST_ASSERT_FALSE(fn_in_rom(sscanf, "sscanf")); #endif +#if !defined(CONFIG_SPIRAM_SUPPORT) TEST_ASSERT(fn_in_rom(atoi, "atoi")); TEST_ASSERT(fn_in_rom(strtol, "strtol")); +#else + TEST_ASSERT_FALSE(fn_in_rom(atoi, "atoi")); + TEST_ASSERT_FALSE(fn_in_rom(strtol, "strtol")); +#endif } #ifndef CONFIG_NEWLIB_NANO_FORMAT