diff options
author | John Högberg <[email protected]> | 2019-08-12 15:18:56 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-08-12 15:18:56 +0200 |
commit | 65874ca12f22c0135399c9161b3091a39e40e20f (patch) | |
tree | 43b72da00021db9cd31f542e2aafe5d2be9ba84d /lib/stdlib | |
parent | d203e847548586f6ef80ac0e73a5f6f173efe1c6 (diff) | |
parent | 9603aed00327d92df7308ff26ba4db79d577c51a (diff) | |
download | otp-65874ca12f22c0135399c9161b3091a39e40e20f.tar.gz otp-65874ca12f22c0135399c9161b3091a39e40e20f.tar.bz2 otp-65874ca12f22c0135399c9161b3091a39e40e20f.zip |
Merge branch 'john/erts/bs_get_binary2-heap-binaries/OTP-15977' into maint
* john/erts/bs_get_binary2-heap-binaries/OTP-15977:
erts: Create heap binaries in binary:split/2-3
erts: Create heap binaries in binary_part/2-3
erts: Create heap binaries in split_binary/2
erts: Create heap binaries in bs_get_binary2
erts: Remove size check in bs_start_match
erts: Disallow binaries whose size in bits exceeds UWORD_MAX
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/test/binary_module_SUITE.erl | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl index 9b2033ec4a..be8ab3b98e 100644 --- a/lib/stdlib/test/binary_module_SUITE.erl +++ b/lib/stdlib/test/binary_module_SUITE.erl @@ -716,22 +716,22 @@ referenced(Config) when is_list(Config) -> badarg = ?MASK_ERROR(binary:referenced_byte_size(apa)), badarg = ?MASK_ERROR(binary:referenced_byte_size({})), badarg = ?MASK_ERROR(binary:referenced_byte_size(1)), - A = <<1,2,3>>, - B = binary:copy(A,1000), - 3 = binary:referenced_byte_size(A), - 3000 = binary:referenced_byte_size(B), - <<_:8,C:2/binary>> = A, - 3 = binary:referenced_byte_size(C), - 2 = binary:referenced_byte_size(binary:copy(C)), - <<_:7,D:2/binary,_:1>> = A, - 2 = binary:referenced_byte_size(binary:copy(D)), - 3 = binary:referenced_byte_size(D), - <<_:8,E:2/binary,_/binary>> = B, - 3000 = binary:referenced_byte_size(E), - 2 = binary:referenced_byte_size(binary:copy(E)), - <<_:7,F:2/binary,_:1,_/binary>> = B, - 2 = binary:referenced_byte_size(binary:copy(F)), - 3000 = binary:referenced_byte_size(F), + A = <<0:(1024 * 8)>>, + B = binary:copy(A, 1000), + 1024 = binary:referenced_byte_size(A), + 1024000 = binary:referenced_byte_size(B), + <<_:8,C:1023/binary>> = A, + 1024 = binary:referenced_byte_size(C), + 1023 = binary:referenced_byte_size(binary:copy(C)), + <<_:7,D:1023/binary,_:1>> = A, + 1023 = binary:referenced_byte_size(binary:copy(D)), + 1024 = binary:referenced_byte_size(D), + <<_:8,E:128/binary,_/binary>> = B, + 1024000 = binary:referenced_byte_size(E), + 128 = binary:referenced_byte_size(binary:copy(E)), + <<_:7,F:128/binary,_:1,_/binary>> = B, + 128 = binary:referenced_byte_size(binary:copy(F)), + 1024000 = binary:referenced_byte_size(F), ok. |