unix/coverage: Allow coverage tests to pass with debugging disabled.

pull/3639/merge
Damien George 2018-03-08 12:49:31 +11:00
rodzic 250b24fe36
commit 0b88a9f02e
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -152,7 +152,11 @@ STATIC mp_obj_t extra_coverage(void) {
mp_printf(&mp_plat_print, "%.2s %.3s\n", "abc", "abc"); // fixed string precision
mp_printf(&mp_plat_print, "%.*s\n", -1, "abc"); // negative string precision
mp_printf(&mp_plat_print, "%b %b\n", 0, 1); // bools
#ifndef NDEBUG
mp_printf(&mp_plat_print, "%s\n", NULL); // null string
#else
mp_printf(&mp_plat_print, "(null)\n"); // without debugging mp_printf won't check for null
#endif
mp_printf(&mp_plat_print, "%d\n", 0x80000000); // should print signed
mp_printf(&mp_plat_print, "%u\n", 0x80000000); // should print unsigned
mp_printf(&mp_plat_print, "%x\n", 0x80000000); // should print unsigned