aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-08-10 14:52:31 +0200
committerRaimo Niskanen <[email protected]>2017-08-16 16:28:57 +0200
commit5d33ec9021ff4fa8e3ffac01bdd0228871636edd (patch)
tree5364028375eee410b120d75a3c4c6d36abfd1a31 /lib/asn1/test/asn1_SUITE.erl
parent6ede2da826335960037299d9f3b0e66d072ea5a0 (diff)
downloadotp-5d33ec9021ff4fa8e3ffac01bdd0228871636edd.tar.gz
otp-5d33ec9021ff4fa8e3ffac01bdd0228871636edd.tar.bz2
otp-5d33ec9021ff4fa8e3ffac01bdd0228871636edd.zip
Fix broken handling of default values in extensions for PER
Default values have never worked in extension for PER. Note that for default values in the root part of SEQUENCE, giving a value equal to the DEFAULT value, will result in the same encoding as if asn1_DEFAULT was given. However, that behavior is not promised by the documentation. The documentation says that asn1_DEFAULT should be used for default values. For DEFAULT in extensions, only implement what the documentation promises and nothing more. ERIERL-60
Diffstat (limited to 'lib/asn1/test/asn1_SUITE.erl')
-rw-r--r--lib/asn1/test/asn1_SUITE.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
index 5fe6945ff2..69f226bcc0 100644
--- a/lib/asn1/test/asn1_SUITE.erl
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -147,6 +147,7 @@ groups() ->
testImport,
testDER,
testDEFAULT,
+ testExtensionDefault,
testMvrasn6,
testContextSwitchingTypes,
testOpenTypeImplicitTag,
@@ -444,6 +445,12 @@ testDEFAULT(Config, Rule, Opts) ->
testDef:main(Rule),
testSeqSetDefaultVal:main(Rule, Opts).
+testExtensionDefault(Config) ->
+ test(Config, fun testExtensionDefault/3).
+testExtensionDefault(Config, Rule, Opts) ->
+ asn1_test_lib:compile_all(["ExtensionDefault"], Config, [Rule|Opts]),
+ testExtensionDefault:main(Rule).
+
testMaps(Config) ->
test(Config, fun testMaps/3,
[{ber,[maps,no_ok_wrapper]},