diff --git a/quickjs.c b/quickjs.c index b6a2df5f..5be082ff 100644 --- a/quickjs.c +++ b/quickjs.c @@ -62,7 +62,7 @@ #define MALLOC_OVERHEAD 8 #endif -#if !defined(_WIN32) +#if !defined(_WIN32) || defined(__MINGW32__) /* define it if printf uses the RNDN rounding mode instead of RNDNA */ #define CONFIG_PRINTF_RNDN #endif diff --git a/tests/test_builtin.js b/tests/test_builtin.js index 4ce2355c..4e571aa4 100644 --- a/tests/test_builtin.js +++ b/tests/test_builtin.js @@ -341,11 +341,6 @@ function test_number() assert(Number.isNaN(Number("-"))); assert(Number.isNaN(Number("\x00a"))); - // TODO: Fix rounding error on MinGW. - if (std.getenv('MSYSTEM')) { - return; - } - assert((25).toExponential(0), "3e+1"); assert((-25).toExponential(0), "-3e+1"); assert((2.5).toPrecision(1), "3");