diff options
author | Björn Gustavsson <[email protected]> | 2015-12-03 15:42:02 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-02-25 14:53:10 +0100 |
commit | 272985d3d1b36833ebd586e5f051ac3a4ab0cd91 (patch) | |
tree | cc60594d05d2af06d35175a2797ed602a77358d9 /erts/emulator/test/multi_load_SUITE.erl | |
parent | 8f4c278b69fe4d613a0b865a2edac43231cad913 (diff) | |
download | otp-272985d3d1b36833ebd586e5f051ac3a4ab0cd91.tar.gz otp-272985d3d1b36833ebd586e5f051ac3a4ab0cd91.tar.bz2 otp-272985d3d1b36833ebd586e5f051ac3a4ab0cd91.zip |
Add has_prepared_code_on_load/1 BIF
Diffstat (limited to 'erts/emulator/test/multi_load_SUITE.erl')
-rw-r--r-- | erts/emulator/test/multi_load_SUITE.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/test/multi_load_SUITE.erl b/erts/emulator/test/multi_load_SUITE.erl index 33e6c15f8f..784b239116 100644 --- a/erts/emulator/test/multi_load_SUITE.erl +++ b/erts/emulator/test/multi_load_SUITE.erl @@ -126,6 +126,12 @@ on_load(_Config) -> MixedPrep = prepare_modules(Mixed), {'EXIT',{system_limit,_}} = (catch erlang:finish_loading(MixedPrep)), + [false,true] = [erlang:has_prepared_code_on_load(Code) || + Code <- MixedPrep], + {'EXIT',{badarg,_}} = (catch erlang:has_prepared_code_on_load(<<1,2,3>>)), + Magic = ets:match_spec_compile([{'_',[true],['$_']}]), + {'EXIT',{badarg,_}} = (catch erlang:has_prepared_code_on_load(Magic)), + SingleOnPrep = tl(OnPrep), {on_load,[OnLoadMod]} = erlang:finish_loading(SingleOnPrep), ok = erlang:call_on_load_function(OnLoadMod), |