aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-02-13 08:29:51 +0100
committerBjörn Gustavsson <[email protected]>2019-02-14 06:52:26 +0100
commit0ab6149067a82d89e584f862604c1c63578fd5fa (patch)
tree32c887276074c1aa758fe655fab8219427e1e81a /erts/emulator/test
parent485713afa0d2481e93882bc386aebb06a49c04bc (diff)
downloadotp-0ab6149067a82d89e584f862604c1c63578fd5fa.tar.gz
otp-0ab6149067a82d89e584f862604c1c63578fd5fa.tar.bz2
otp-0ab6149067a82d89e584f862604c1c63578fd5fa.zip
Add persistent_term:get(Key, DefaultValue)
https://bugs.erlang.org/browse/ERL-843
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/persistent_term_SUITE.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/test/persistent_term_SUITE.erl b/erts/emulator/test/persistent_term_SUITE.erl
index 58038e24b7..93eb026ced 100644
--- a/erts/emulator/test/persistent_term_SUITE.erl
+++ b/erts/emulator/test/persistent_term_SUITE.erl
@@ -6,7 +6,7 @@
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
-%5
+%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
@@ -60,7 +60,8 @@ basic(_Config) ->
Key = {?MODULE,{key,I}},
true = persistent_term:erase(Key),
false = persistent_term:erase(Key),
- {'EXIT',{badarg,_}} = (catch persistent_term:get(Key))
+ {'EXIT',{badarg,_}} = (catch persistent_term:get(Key)),
+ {not_present,Key} = persistent_term:get(Key, {not_present,Key})
end || I <- Seq],
[] = [P || {{?MODULE,_},_}=P <- pget(Chk)],
chk(Chk).