diff options
author | Erlang/OTP <[email protected]> | 2010-06-02 13:15:16 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-06-02 13:15:16 +0000 |
commit | a2b84aa66d96ac3f808ca60d2de072992fdb1410 (patch) | |
tree | 449a23f20a4c0c263b9eee2329d4b9a9951ee904 /erts/emulator | |
parent | 841de5287ecef4dae5ea2e78531d8216f9b87989 (diff) | |
parent | a62abc91b5f95fc9137d42867e1429867a77bf4e (diff) | |
download | otp-a2b84aa66d96ac3f808ca60d2de072992fdb1410.tar.gz otp-a2b84aa66d96ac3f808ca60d2de072992fdb1410.tar.bz2 otp-a2b84aa66d96ac3f808ca60d2de072992fdb1410.zip |
Merge branch 'jv/autoimport-binary_to_term_2' into dev
* jv/autoimport-binary_to_term_2:
Change binary_to_term/2 to be auto-imported
OTP-8671 jv/autoimport-binary_to_term_2
Now, binary_to_term/2 is auto-imported. This will cause a compile warning
if and only if a module has got a local function with that name.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/test/binary_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/test/binary_SUITE.erl b/erts/emulator/test/binary_SUITE.erl index 7ecc31aa29..77d2579848 100644 --- a/erts/emulator/test/binary_SUITE.erl +++ b/erts/emulator/test/binary_SUITE.erl @@ -438,11 +438,11 @@ terms(Config) when is_list(Config) -> ok end, Term = binary_to_term(Bin), - Term = erlang:binary_to_term(Bin, [safe]), + Term = binary_to_term(Bin, [safe]), Unaligned = make_unaligned_sub_binary(Bin), Term = binary_to_term(Unaligned), - Term = erlang:binary_to_term(Unaligned, []), - Term = erlang:binary_to_term(Bin, [safe]), + Term = binary_to_term(Unaligned, []), + Term = binary_to_term(Bin, [safe]), BinC = erlang:term_to_binary(Term, [compressed]), Term = binary_to_term(BinC), true = size(BinC) =< size(Bin), @@ -542,7 +542,7 @@ bad_bin_to_term(BadBin) -> {'EXIT',{badarg,_}} = (catch binary_to_term(BadBin)). bad_bin_to_term(BadBin,Opts) -> - {'EXIT',{badarg,_}} = (catch erlang:binary_to_term(BadBin,Opts)). + {'EXIT',{badarg,_}} = (catch binary_to_term(BadBin,Opts)). safe_binary_to_term2(doc) -> "Test safety options for binary_to_term/2"; safe_binary_to_term2(Config) when is_list(Config) -> @@ -553,7 +553,7 @@ safe_binary_to_term2(Config) when is_list(Config) -> BadRef = <<131,114,0,3,BadHostAtom/binary,0,<<0,0,0,255>>/binary, Empty/binary,Empty/binary>>, ?line bad_bin_to_term(BadRef, [safe]), % good ref, with a bad atom - ?line fullsweep_after = erlang:binary_to_term(<<131,100,0,15,"fullsweep_after">>, [safe]), % should be a good atom + ?line fullsweep_after = binary_to_term(<<131,100,0,15,"fullsweep_after">>, [safe]), % should be a good atom BadExtFun = <<131,113,100,0,4,98,108,117,101,100,0,4,109,111,111,110,97,3>>, ?line bad_bin_to_term(BadExtFun, [safe]), ok. |