aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorMike Sperber <[email protected]>2012-07-17 10:03:49 +0200
committerMike Sperber <[email protected]>2012-07-17 10:03:49 +0200
commitcab9edd0a6f1fad2c3ec9661b39627756ad9d2ba (patch)
tree0cce414e6cbbffd87ec9f68d084203fc8c96c138 /erts/emulator/test
parent933e701dac1936c6f15c765b5687fbc623464ec7 (diff)
downloadotp-cab9edd0a6f1fad2c3ec9661b39627756ad9d2ba.tar.gz
otp-cab9edd0a6f1fad2c3ec9661b39627756ad9d2ba.tar.bz2
otp-cab9edd0a6f1fad2c3ec9661b39627756ad9d2ba.zip
Add test for floating-point output to float_SUITE.
This catches endianness problems, such as recently reported for ARMs.
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/float_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/erts/emulator/test/float_SUITE.erl b/erts/emulator/test/float_SUITE.erl
index 8e6923ce9f..abe01bf5ec 100644
--- a/erts/emulator/test/float_SUITE.erl
+++ b/erts/emulator/test/float_SUITE.erl
@@ -25,7 +25,7 @@
init_per_group/2,end_per_group/2,
init_per_testcase/2,end_per_testcase/2,
fpe/1,fp_drv/1,fp_drv_thread/1,denormalized/1,match/1,
- bad_float_unpack/1,cmp_zero/1, cmp_integer/1, cmp_bignum/1]).
+ bad_float_unpack/1, write/1, cmp_zero/1, cmp_integer/1, cmp_bignum/1]).
-export([otp_7178/1]).
-export([hidden_inf/1]).
@@ -42,7 +42,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[fpe, fp_drv, fp_drv_thread, otp_7178, denormalized,
- match, bad_float_unpack, {group, comparison}
+ match, bad_float_unpack, write, {group, comparison}
,hidden_inf
].
@@ -190,6 +190,11 @@ bad_float_unpack(Config) when is_list(Config) ->
bad_float_unpack_match(<<F:64/float>>) -> F;
bad_float_unpack_match(<<I:64/integer-signed>>) -> I.
+%% Exposes endianness issues.
+
+write(Config) when is_list(Config) ->
+ "1.0" = io_lib:write(1.0).
+
cmp_zero(_Config) ->
cmp(0.5e-323,0).