aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/binary_module_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-02-27 11:58:32 +0100
committerBjörn Gustavsson <[email protected]>2019-02-27 14:28:32 +0100
commitc317106f450c49e7e6741af1c9d49ae7a378350f (patch)
treedfd62cb0a68057dfa39674163a88676db78d86b0 /lib/stdlib/test/binary_module_SUITE.erl
parent5e2d3bc0b4fdd0aba18f8b6dda5d22d2febff32a (diff)
downloadotp-c317106f450c49e7e6741af1c9d49ae7a378350f.tar.gz
otp-c317106f450c49e7e6741af1c9d49ae7a378350f.tar.bz2
otp-c317106f450c49e7e6741af1c9d49ae7a378350f.zip
Fix failing test case binary_module_SUITE:copy/1
The stronger compiler optimizations made the test case fail.
Diffstat (limited to 'lib/stdlib/test/binary_module_SUITE.erl')
-rw-r--r--lib/stdlib/test/binary_module_SUITE.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl
index e0811f19cf..9b2033ec4a 100644
--- a/lib/stdlib/test/binary_module_SUITE.erl
+++ b/lib/stdlib/test/binary_module_SUITE.erl
@@ -755,8 +755,9 @@ list_to_bin(Config) when is_list(Config) ->
copy(Config) when is_list(Config) ->
<<1,2,3>> = binary:copy(<<1,2,3>>),
RS = random_string({1,10000}),
- RS = RS2 = binary:copy(RS),
- false = erts_debug:same(RS,RS2),
+ RS2 = binary:copy(RS),
+ true = RS =:= RS2,
+ false = erts_debug:same(RS, RS2),
<<>> = ?MASK_ERROR(binary:copy(<<1,2,3>>,0)),
badarg = ?MASK_ERROR(binary:copy(<<1,2,3:3>>,2)),
badarg = ?MASK_ERROR(binary:copy([],0)),