aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-02-15 09:55:33 +0100
committerGitHub <[email protected]>2019-02-15 09:55:33 +0100
commit595c159823089d0186ec2617c174356d1ff2de65 (patch)
tree5c0a7ec7cf13c699b10daf284011a7a881e69eed /erts/emulator/test
parent741109889b96e92c2edc38f4068e27ac5cd53fb8 (diff)
parent0ab6149067a82d89e584f862604c1c63578fd5fa (diff)
downloadotp-595c159823089d0186ec2617c174356d1ff2de65.tar.gz
otp-595c159823089d0186ec2617c174356d1ff2de65.tar.bz2
otp-595c159823089d0186ec2617c174356d1ff2de65.zip
Merge pull request #2140 from bjorng/bjorn/erts/persistent_term-default/ERL-843/OTP-15576
Add persistent_term:get(Key, DefaultValue)
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).