diff options
author | John Högberg <[email protected]> | 2019-01-10 09:41:23 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-01-10 09:41:23 +0100 |
commit | 78e67434b34813b8efe61f8e8dca445dd12b0f7b (patch) | |
tree | 38212f3401c5c5c9d839ca65f906112b1cc51ca6 /erts/emulator/test | |
parent | 6120af3481f9deac2be1ff4bbb2684f24ef172eb (diff) | |
parent | 46c7a85d70ee6d060a393ca4b22b06eef6fbb324 (diff) | |
download | otp-78e67434b34813b8efe61f8e8dca445dd12b0f7b.tar.gz otp-78e67434b34813b8efe61f8e8dca445dd12b0f7b.tar.bz2 otp-78e67434b34813b8efe61f8e8dca445dd12b0f7b.zip |
Merge branch 'john/erts/int_to_list_by_base/OTP-15503/PR-2052' into maint
* john/erts/int_to_list_by_base/OTP-15503/PR-2052:
Implement integer_to_list/2 and integer_to_binary/2 as CIFs
Accept base in all integer-printing functions
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/num_bif_SUITE.erl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/erts/emulator/test/num_bif_SUITE.erl b/erts/emulator/test/num_bif_SUITE.erl index f15217814a..6b834705cf 100644 --- a/erts/emulator/test/num_bif_SUITE.erl +++ b/erts/emulator/test/num_bif_SUITE.erl @@ -504,6 +504,10 @@ t_integer_to_string(Config) when is_list(Config) -> test_its("A", 10, 16), test_its("D4BE", 54462, 16), test_its("-D4BE", -54462, 16), + test_its("FFFFFFFFFF", 1099511627775, 16), + test_its("123456789ABCDEF123456789ABCDEF123456789ABCDEF", + 108977460683796539709587792812439445667270661579197935, + 16), lists:foreach(fun(Value) -> {'EXIT', {badarg, _}} = @@ -515,12 +519,14 @@ t_integer_to_string(Config) when is_list(Config) -> ok. test_its(List,Int) -> - Int = list_to_integer(List), - Int = binary_to_integer(list_to_binary(List)). + List = integer_to_list(Int), + Binary = list_to_binary(List), + Binary = integer_to_binary(Int). test_its(List,Int,Base) -> - Int = list_to_integer(List, Base), - Int = binary_to_integer(list_to_binary(List), Base). + List = integer_to_list(Int, Base), + Binary = list_to_binary(List), + Binary = integer_to_binary(Int, Base). %% Tests binary_to_integer/1. |