aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/test
diff options
context:
space:
mode:
authorJohannes Weißl <[email protected]>2013-06-14 15:24:04 +0200
committerJohannes Weißl <[email protected]>2013-06-14 15:25:12 +0200
commit9e45648698862905561baa533831afd4dd23a02a (patch)
treed42c5ddc73fce9ff3b951b48a462cb18f2fe71b0 /lib/debugger/test
parent5adbd7d22bccc57e17ed00cac09fe8a336bb39c7 (diff)
downloadotp-9e45648698862905561baa533831afd4dd23a02a.tar.gz
otp-9e45648698862905561baa533831afd4dd23a02a.tar.bz2
otp-9e45648698862905561baa533831afd4dd23a02a.zip
Fix binary construction on floating point middle-endian machines
This complements 933e701 (OTP-10209). Without this patch the test cases "in_guard/1" and "coerce_to_float/1" in bs_construct_SUITE fail. The added lines in bs_construct_SUITE cover all branches that were not covered before (small and big numbers if BIT_OFFSET(erts_bin_offset) != 0).
Diffstat (limited to 'lib/debugger/test')
-rw-r--r--lib/debugger/test/bs_construct_SUITE.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/debugger/test/bs_construct_SUITE.erl b/lib/debugger/test/bs_construct_SUITE.erl
index e0bda7eac8..4870c87d74 100644
--- a/lib/debugger/test/bs_construct_SUITE.erl
+++ b/lib/debugger/test/bs_construct_SUITE.erl
@@ -454,6 +454,8 @@ in_guard(Config) when is_list(Config) ->
?line 1 = in_guard(<<16#74ad:16>>, 16#e95, 5),
?line 2 = in_guard(<<16#3A,16#F7,"hello">>, 16#3AF7, <<"hello">>),
?line 3 = in_guard(<<16#FBCD:14,3.1415/float,3:2>>, 16#FBCD, 3.1415),
+ ?line 3 = in_guard(<<16#FBCD:14,3/float,3:2>>, 16#FBCD, 3),
+ ?line 3 = in_guard(<<16#FBCD:14,(2 bsl 226)/float,3:2>>, 16#FBCD, 2 bsl 226),
nope = in_guard(<<1>>, 42, b),
nope = in_guard(<<1>>, a, b),
nope = in_guard(<<1,2>>, 1, 1),