diff options
author | Dan Gudmundsson <[email protected]> | 2014-11-28 11:59:15 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:29 +0100 |
commit | aed8cf4f5ccbc5b98a691dd0db3203a3c3680983 (patch) | |
tree | 0461f6da0f6cccf07e706a60224b00c650f420d4 /lib/asn1/test | |
parent | 83ba2c5e84cee40698489c8e740c96adc07b1d44 (diff) | |
download | otp-aed8cf4f5ccbc5b98a691dd0db3203a3c3680983.tar.gz otp-aed8cf4f5ccbc5b98a691dd0db3203a3c3680983.tar.bz2 otp-aed8cf4f5ccbc5b98a691dd0db3203a3c3680983.zip |
Modernize error handling for CHOICE
Diffstat (limited to 'lib/asn1/test')
-rw-r--r-- | lib/asn1/test/error_SUITE.erl | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl index c097943c75..b701e0e51d 100644 --- a/lib/asn1/test/error_SUITE.erl +++ b/lib/asn1/test/error_SUITE.erl @@ -792,6 +792,15 @@ values(Config) -> " ext-1 EXTERNAL ::= {identification bad:{1 2 3}, data-value '123'H}\n" " ext-2 EXTERNAL ::= {identification syntax:{1 2 3}, data '123'H}\n" + " CH ::= CHOICE { a INTEGER, b BOOLEAN }\n" + " ch1 CH ::= 2344\n" + " ch2 CH ::= zz:34\n" + + " st1 an < Seq ::= 42\n" + " st2 zz < CH ::= 42\n" + " st3 a < HOLDER ::= 42\n" + " st4 a < INTEGER ::= 42\n" + " int INTEGER ::= 42\n" "END\n">>}, {error, @@ -841,7 +850,19 @@ values(Config) -> {structured_error,{M,33},asn1ct_check, illegal_external_value}, {structured_error,{M,34},asn1ct_check, - illegal_external_value} + illegal_external_value}, + {structured_error,{M,36},asn1ct_check, + {illegal_choice_id, 2344}}, + {structured_error,{M,37},asn1ct_check, + {illegal_choice_id, zz}}, + {structured_error,{M,38},asn1ct_check, + {illegal_choice_type, 'Seq'}}, + {structured_error,{M,39},asn1ct_check, + {illegal_choice_id, zz}}, + {structured_error,{M,40},asn1ct_check, + {illegal_choice_type, 'HOLDER'}}, + {structured_error,{M,41},asn1ct_check, + {illegal_choice_type, 'INTEGER'}} ] } = run(P, Config), ok. |