diff options
author | Dan Gudmundsson <dgud@erlang.org> | 2014-11-26 16:44:14 +0100 |
---|---|---|
committer | Dan Gudmundsson <dgud@erlang.org> | 2014-11-26 16:50:32 +0100 |
commit | 00d216799845f2a38dfb71ad0979c5bcab74c696 (patch) | |
tree | aa033d8a789ba5066e184dc7d98b9f4e9d8991c0 /lib/asn1/test | |
parent | 3fe044dec08ccca9469c5d8b8bec1892072212f0 (diff) | |
download | otp-00d216799845f2a38dfb71ad0979c5bcab74c696.tar.gz otp-00d216799845f2a38dfb71ad0979c5bcab74c696.tar.bz2 otp-00d216799845f2a38dfb71ad0979c5bcab74c696.zip |
asn1: Fix EXTERNAL (1994 variant) type conversion
Missed to add seqtag handling for EXTERNAL type conversion,
bug introduced in c266196c016fc1156c7a18cfeec4920ee4075519
Diffstat (limited to 'lib/asn1/test')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1 | 4 | ||||
-rw-r--r-- | lib/asn1/test/testContextSwitchingTypes.erl | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1 b/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1 index c8145bad63..e279a180c1 100644 --- a/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1 @@ -21,6 +21,10 @@ val3-T T ::= {identification context-negotiation:{presentation-context-id 12, transfer-syntax {1 2 3}}, data-value '123'H} +val4-T T ::= {identification presentation-context-id:42, + data-value-descriptor "FooBar", + data-value '123'H} + -- EMBEDDED PDV type EP ::= EMBEDDED PDV diff --git a/lib/asn1/test/testContextSwitchingTypes.erl b/lib/asn1/test/testContextSwitchingTypes.erl index bdd6883dac..61d1fbdd69 100644 --- a/lib/asn1/test/testContextSwitchingTypes.erl +++ b/lib/asn1/test/testContextSwitchingTypes.erl @@ -24,11 +24,21 @@ -include_lib("test_server/include/test_server.hrl"). test(Config) -> - ValT = 'ContextSwitchingTypes':'val1-T'(), - check_EXTERNAL(enc_dec('T', ValT)), + ValT_1 = 'ContextSwitchingTypes':'val1-T'(), + check_EXTERNAL(enc_dec('T', ValT_1)), + + ValT_2 = 'ContextSwitchingTypes':'val2-T'(), + check_EXTERNAL(enc_dec('T', ValT_2)), + + ValT_3 = 'ContextSwitchingTypes':'val3-T'(), + check_EXTERNAL(enc_dec('T', ValT_3)), + + ValT_4 = 'ContextSwitchingTypes':'val4-T'(), + check_EXTERNAL(enc_dec('T', ValT_4)), {ok,ValT2} = asn1ct:value('ContextSwitchingTypes', 'T', [{i,?config(case_dir, Config)}]), + io:format("ValT2 ~p~n",[ValT2]), check_EXTERNAL(enc_dec('T', ValT2)), ValEP = 'ContextSwitchingTypes':'val1-EP'(), |