diff options
author | John Högberg <[email protected]> | 2018-06-26 07:18:03 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-06-26 07:18:03 +0200 |
commit | 712896f75f88dac86334f4a72fe04e80e9ca56bd (patch) | |
tree | 54ca6905cde4fbd04b85f9356e1cfb08a41fef80 /lib/compiler/test | |
parent | d6285b0a347b9489ce939511ee9a979acd868f71 (diff) | |
parent | a4381a973e2efcd7c1fd1e0f2e9e6619b9b59c67 (diff) | |
download | otp-712896f75f88dac86334f4a72fe04e80e9ca56bd.tar.gz otp-712896f75f88dac86334f4a72fe04e80e9ca56bd.tar.bz2 otp-712896f75f88dac86334f4a72fe04e80e9ca56bd.zip |
Merge branch 'maint'
* maint:
Updated OTP version
Prepare release
Fix unsafe optimization when running beam_block the second time
Fix environment case sensitivity issues on Windows
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/beam_utils_SUITE.erl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/compiler/test/beam_utils_SUITE.erl b/lib/compiler/test/beam_utils_SUITE.erl index 3d35b546fc..360dcc1e84 100644 --- a/lib/compiler/test/beam_utils_SUITE.erl +++ b/lib/compiler/test/beam_utils_SUITE.erl @@ -132,6 +132,15 @@ bs_init(_Config) -> <<"foo/foo">> = do_bs_init_4(<<"foo">>, true), error = do_bs_init_4([], not_boolean), + Id = 17575, + Domain = -8798798, + [<<10,1:16,Id:16/signed>>,<<8,2:16,Domain:32/signed>>] = + do_bs_init_5(#{tag=>value,id=>Id,domain=>Domain}), + {'EXIT',{{required,id},[_|_]}} = + (catch do_bs_init_5(#{tag=>value,id=>nil,domain=>Domain})), + {'EXIT',{{required,domain},[_|_]}} = + (catch do_bs_init_5(#{tag=>value,id=>Id,domain=>nil})), + ok. do_bs_init_1([?MODULE], Sz) -> @@ -189,6 +198,20 @@ do_bs_init_4(Arg1, Arg2) -> error end. +do_bs_init_5(#{tag := value, id := Id, domain := Domain}) -> + [case Id of + nil -> + error(id({required, id})); + _ -> + <<10, 1:16/signed, Id:16/signed>> + end, + case Domain of + nil -> + error(id({required, domain})); + _ -> + <<8, 2:16/signed, Domain:32/signed>> + end]. + bs_save(_Config) -> {a,30,<<>>} = do_bs_save(<<1:1,30:5>>), {b,127,<<>>} = do_bs_save(<<1:1,31:5,0:1,127:7>>), |