diff --git a/libc/scanf/stdio_scanf.c b/libc/scanf/stdio_scanf.c index 626312b2..9a14bf2f 100644 --- a/libc/scanf/stdio_scanf.c +++ b/libc/scanf/stdio_scanf.c @@ -27,20 +27,7 @@ #include #include #include - - -/* - * All tests for floats are disabled in this test of - * issues #652 and #634 which cause problems with scanning these values. - * #652 https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - * #634 https://github.com/phoenix-rtos/phoenix-rtos-project/issues/634 - */ - - -/* Disabled because of #656 issue */ -#ifndef __phoenix__ #include -#endif #include @@ -2638,18 +2625,6 @@ TEST_TEAR_DOWN(stdio_scanf_aefg) TEST(stdio_scanf_aefg, f) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%f %f %f %f %f %f %f"; @@ -2691,18 +2666,6 @@ TEST(stdio_scanf_aefg, f) TEST(stdio_scanf_aefg, F) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%F %F %F %F %F %F %F"; @@ -2744,18 +2707,6 @@ TEST(stdio_scanf_aefg, F) TEST(stdio_scanf_aefg, a) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%a %a %a %a %a %a %a"; @@ -2792,18 +2743,6 @@ TEST(stdio_scanf_aefg, a) TEST(stdio_scanf_aefg, A) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%A %A %A %A %A %A %A"; @@ -2840,18 +2779,6 @@ TEST(stdio_scanf_aefg, A) TEST(stdio_scanf_aefg, e) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%e %e %e %e %e %e %e"; @@ -2888,18 +2815,6 @@ TEST(stdio_scanf_aefg, e) TEST(stdio_scanf_aefg, E) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%E %E %E %E %E %E %E"; @@ -2936,18 +2851,6 @@ TEST(stdio_scanf_aefg, E) TEST(stdio_scanf_aefg, g) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%g %g %g %g %g %g %g"; @@ -2984,18 +2887,6 @@ TEST(stdio_scanf_aefg, g) TEST(stdio_scanf_aefg, G) { - /* - * Scanf doesn't support longer floating-point numbers - * Problems occur when scanf needs to read big numbers after coma. - * example: 0.234234345345 scanf will read - * example 2.212121e-100 scanf won't read because this is along float after a coma. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/652 - */ - -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%G %G %G %G %G %G %G"; @@ -3032,15 +2923,6 @@ TEST(stdio_scanf_aefg, G) TEST(stdio_scanf_aefg, inf_nan_f) { - /* - * Scanf Inf and Nan handling problem - * There is a problem with Scanf where it is unable to read any representation of valInf or valNan. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/634 - */ -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; double valInf, valNan, valNegInf; const char *format = "%lf %lf %lf"; @@ -3088,15 +2970,6 @@ TEST(stdio_scanf_aefg, inf_nan_f) TEST(stdio_scanf_aefg, inf_nan_a) { - /* - * Scanf Inf and Nan handling problem - * There is a problem with Scanf where it is unable to read any representation of valInf or valNan. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/634 - */ -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; double valInf, valNan, valNegInf; const char *format = "%la %la %la"; @@ -3144,15 +3017,6 @@ TEST(stdio_scanf_aefg, inf_nan_a) TEST(stdio_scanf_aefg, inf_nan_e) { - /* - * Scanf Inf and Nan handling problem - * There is a problem with Scanf where it is unable to read any representation of valInf or valNan. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/634 - */ -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; double valInf, valNan, valNegInf; const char *format = "%le %le %le"; @@ -3200,15 +3064,6 @@ TEST(stdio_scanf_aefg, inf_nan_e) TEST(stdio_scanf_aefg, inf_nan_g) { - /* - * Scanf Inf and Nan handling problem - * There is a problem with Scanf where it is unable to read any representation of valInf or valNan. - * Issue link: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/634 - */ -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN] = { 0 }; double valInf, valNan, valNegInf; const char *format = "%lg %lg %lg"; @@ -4538,11 +4393,6 @@ TEST(stdio_scanf_rest, star) TEST(stdio_scanf_rest, field_width) { -/* Test ignored because of issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/681 */ -#ifdef __phoenix__ - TEST_IGNORE(); -#endif - char buff[BUFF_LEN], valStr[BUFF_LEN], str[] = "LoreIpsumDolorSitAmet"; int intMax = 2147483647, intMin = -2147483647, valIntMin, valIntMax; float fltMax = 3.40282347e+7F, fltMin = 3.40282347e-4F, valFltMin, valFltMax; diff --git a/libc/stdlib/stdlib_strto.c b/libc/stdlib/stdlib_strto.c index a382d03e..22cecc1d 100644 --- a/libc/stdlib/stdlib_strto.c +++ b/libc/stdlib/stdlib_strto.c @@ -64,10 +64,6 @@ TEST(stdlib_strto, strtod_basic) TEST(stdlib_strto, strtod_basic_hex) { -/* Disabled because of #703 issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/703 */ -#ifdef __phoenix__ - TEST_IGNORE_MESSAGE("#703 issue"); -#endif char *end; const char *str[] = { "0X0.0P+0", "0X1.0P+0", "-0X1.0P+0", "0X1.0P-126", "0X1.FFFFFEP+127", "-0X1.0P-126", "-0X1.FFFFFEP+127" }; const double expected[] = { 0.0, 1, -1, FLT_MIN, FLT_MAX, -FLT_MIN, -FLT_MAX }; @@ -92,11 +88,6 @@ TEST(stdlib_strto, strtod_min_max) TEST_ASSERT_EQUAL_DOUBLE(DBL_MAX, strtod("1.797693134862315e+308", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); -/* Disabled because of #703 issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/703 */ -#ifdef __phoenix__ - TEST_IGNORE_MESSAGE("#703 issue"); -#endif - errno = 0; TEST_ASSERT_EQUAL_DOUBLE(DBL_MIN, strtod("0x1p-1022", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); @@ -127,10 +118,6 @@ TEST(stdlib_strto, strtof_basic) TEST(stdlib_strto, strtof_basic_hex) { -/* Disabled because of #703 issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/703 */ -#ifdef __phoenix__ - TEST_IGNORE_MESSAGE("#703 issue"); -#endif char *end; const char *str[] = { "0X0.0P+0", "0X1.0P+0", "-0X1.0P+0", "0x1.81cd6e631f8a1p+13", "-0x1.81cd6e631f8a1p+13" }; const float expected[] = { 0.0, 1, -1, 12345.67890, -12345.67890 }; @@ -155,11 +142,6 @@ TEST(stdlib_strto, strtof_min_max) TEST_ASSERT_EQUAL_FLOAT(FLT_MAX, strtof("3.40282347e+38", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); -/* Disabled because of #703 issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/703 */ -#ifdef __phoenix__ - TEST_IGNORE_MESSAGE("#703 issue"); -#endif - errno = 0; TEST_ASSERT_EQUAL_FLOAT(FLT_MIN, strtof("0X1.0P-126", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); @@ -190,10 +172,6 @@ TEST(stdlib_strto, strtold_basic) TEST(stdlib_strto, strtold_basic_hex) { -/* Disabled because of #703 issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/703 */ -#ifdef __phoenix__ - TEST_IGNORE_MESSAGE("#703 issue"); -#endif char *end; const char *str[] = { "0X0.0P+0", "0X1.0P+0", "-0X1.0P+0", "0X1.0P-126", "0X1.FFFFFEP+127", "-0X1.0P-126", "-0X1.FFFFFEP+127", "0x1p-1022", "0x1.fffffffffffffp+1023" }; const long double expected[] = { 0.0, 1, -1, FLT_MIN, FLT_MAX, -FLT_MIN, -FLT_MAX, DBL_MIN, DBL_MAX }; @@ -223,11 +201,6 @@ TEST(stdlib_strto, strtold_min_max) TEST_ASSERT_EQUAL_DOUBLE(DBL_MAX, strtold("1.797693134862315e+308", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); -/* Disabled because of #703 issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/703 */ -#ifdef __phoenix__ - TEST_IGNORE_MESSAGE("#703 issue"); -#endif - errno = 0; TEST_ASSERT_EQUAL_DOUBLE(DBL_MIN, strtold("0x1p-1022", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); @@ -697,10 +670,6 @@ TEST(stdlib_strto, strtoull_min_max) TEST(stdlib_strto, inf_nan) { -/* Disabled because of #704 issue: https://github.com/phoenix-rtos/phoenix-rtos-project/issues/704 */ -#ifdef __phoenix__ - TEST_IGNORE_MESSAGE("#704 issue"); -#endif char *end; const char *str[] = { "Inf", "-Inf", "INF", "-INF", "NaN", "-NaN", "NAN", "-NAN" }; const double exp_double[] = { INFINITY, -INFINITY, INFINITY, -INFINITY, NAN, -NAN, NAN, -NAN };