aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test/asn1_SUITE.erl')
-rw-r--r--lib/asn1/test/asn1_SUITE.erl16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
index 888339a4d2..432197eec0 100644
--- a/lib/asn1/test/asn1_SUITE.erl
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -60,7 +60,8 @@ groups() ->
{ber, Parallel,
[ber_choiceinseq,
% Uses 'SOpttest'
- ber_optional]},
+ ber_optional,
+ tagdefault_automatic]},
{app_test, [], [{asn1_app_test, all}]},
@@ -659,6 +660,19 @@ ber_optional(Config, Rule, Opts) ->
{'C', asn1_NOVALUE, 111, asn1_NOVALUE}},
asn1_test_lib:roundtrip('SOpttest', 'S', V).
+tagdefault_automatic(Config) ->
+ test(Config, fun tagdefault_automatic/3, [ber]).
+tagdefault_automatic(Config, Rule, Opts) ->
+ asn1_test_lib:compile("TAGDEFAULT-AUTOMATIC", Config, [Rule|Opts]),
+ << 48,8,128,2,100,101,129,2,110,111 >> =
+ asn1_test_lib:roundtrip_enc('TAGDEFAULT-AUTOMATIC', 'Tagged', {'Tagged', << 100,101 >>, << 110,111 >>}),
+ << 48,8,128,2,100,101,129,2,110,111 >> =
+ asn1_test_lib:roundtrip_enc('TAGDEFAULT-AUTOMATIC', 'Untagged', {'Untagged', << 100,101 >>, << 110,111 >>}),
+ << 48,8,4,2,100,101,130,2,110,111 >> =
+ asn1_test_lib:roundtrip_enc('TAGDEFAULT-AUTOMATIC', 'Mixed', {'Mixed', << 100,101 >>, << 110,111 >>}),
+
+ ok.
+
%% records used by test-case default
-record('Def1', {bool0,
bool1 = asn1_DEFAULT,