diff options
author | Fredrik Gustafsson <[email protected]> | 2013-07-11 14:39:25 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-07-11 14:39:25 +0200 |
commit | 193639fde33e135cc390f1df13076e5632fdd43c (patch) | |
tree | ff96600d3421002a8754875b9fd1d6b55a25f290 /erts/emulator/test/binary_SUITE.erl | |
parent | 15874f5848bb4686b1ab1986adc2e8c366492a4d (diff) | |
parent | 9e45648698862905561baa533831afd4dd23a02a (diff) | |
download | otp-193639fde33e135cc390f1df13076e5632fdd43c.tar.gz otp-193639fde33e135cc390f1df13076e5632fdd43c.tar.bz2 otp-193639fde33e135cc390f1df13076e5632fdd43c.zip |
Merge branch 'jw/fix-float-middle-endian/OTP-11201' into maint
* jw/fix-float-middle-endian/OTP-11201:
Fix binary construction on floating point middle-endian machines
Fix binary matching on floating point middle-endian machines
Fix erlang:phash2() on floating point middle-endian machines
Fix external term format BIFs on floating point middle-endian machines
Diffstat (limited to 'erts/emulator/test/binary_SUITE.erl')
-rw-r--r-- | erts/emulator/test/binary_SUITE.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/emulator/test/binary_SUITE.erl b/erts/emulator/test/binary_SUITE.erl index fe0a745db8..08ab094019 100644 --- a/erts/emulator/test/binary_SUITE.erl +++ b/erts/emulator/test/binary_SUITE.erl @@ -47,7 +47,8 @@ copy_terms/1, conversions/1, deep_lists/1, deep_bitstr_lists/1, bad_list_to_binary/1, bad_binary_to_list/1, t_split_binary/1, bad_split/1, - terms/1, terms_float/1, external_size/1, t_iolist_size/1, + terms/1, terms_float/1, float_middle_endian/1, + external_size/1, t_iolist_size/1, t_hash/1, bad_size/1, bad_term_to_binary/1, @@ -69,7 +70,7 @@ all() -> [copy_terms, conversions, deep_lists, deep_bitstr_lists, t_split_binary, bad_split, bad_list_to_binary, bad_binary_to_list, terms, - terms_float, external_size, t_iolist_size, + terms_float, float_middle_endian, external_size, t_iolist_size, bad_binary_to_term_2, safe_binary_to_term2, bad_binary_to_term, bad_terms, t_hash, bad_size, bad_term_to_binary, more_bad_terms, otp_5484, otp_5933, @@ -486,6 +487,11 @@ terms_float(Config) when is_list(Config) -> true = Size1 < Size0 end). +float_middle_endian(Config) when is_list(Config) -> + %% Testing for roundtrip is not enough. + ?line <<131,70,63,240,0,0,0,0,0,0>> = term_to_binary(1.0, [{minor_version,1}]), + ?line 1.0 = binary_to_term(<<131,70,63,240,0,0,0,0,0,0>>). + external_size(Config) when is_list(Config) -> %% Build a term whose external size only fits in a big num (on 32-bit CPU). ?line external_size_1(16#11111111111111117777777777777777888889999, 0, 16#FFFFFFF), |