aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/num_bif_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-04-10 16:15:18 +0200
committerSverker Eriksson <[email protected]>2018-04-10 16:15:18 +0200
commit9d19331d3e2402a74346e664befb1d1e0749240f (patch)
tree4649d02ecb6632f35b1871fafb27453e6882bdab /erts/emulator/test/num_bif_SUITE.erl
parent9091e0fc630913999e3a51e860a2c4e07c6143c1 (diff)
downloadotp-9d19331d3e2402a74346e664befb1d1e0749240f.tar.gz
otp-9d19331d3e2402a74346e664befb1d1e0749240f.tar.bz2
otp-9d19331d3e2402a74346e664befb1d1e0749240f.zip
erts: Workaround test t_float_to_string for windows
Diffstat (limited to 'erts/emulator/test/num_bif_SUITE.erl')
-rw-r--r--erts/emulator/test/num_bif_SUITE.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/erts/emulator/test/num_bif_SUITE.erl b/erts/emulator/test/num_bif_SUITE.erl
index 104bd37817..290bb61fc8 100644
--- a/erts/emulator/test/num_bif_SUITE.erl
+++ b/erts/emulator/test/num_bif_SUITE.erl
@@ -213,7 +213,7 @@ fts_rand_float_decimals(N) ->
[begin
F0 = rand_float_reasonable(),
L0 = float_to_list(F0, [{decimals, D}]),
- case conform_with_io_lib_format(F0,D) of
+ case conform_with_io_lib_format_os(F0,D) of
false -> ok;
true ->
IOL = lists:flatten(io_lib:format("~.*f", [D, F0])),
@@ -248,6 +248,15 @@ fts_rand_float_decimals(N) ->
fts_rand_float_decimals(N-1).
+conform_with_io_lib_format_os(F, D) ->
+ case os:type() of
+ {win32,_} ->
+ %% io_lib:format("~.*f") buggy on windows? OTP-15010
+ false;
+ _ ->
+ conform_with_io_lib_format(F, D)
+ end.
+
conform_with_io_lib_format(_, 0) ->
%% io_lib:format("~.*f") does not support zero decimals
false;