diff options
author | Björn Gustavsson <[email protected]> | 2014-10-31 15:22:40 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:26 +0100 |
commit | 6d9725178dd44aa0337901b081be93113f988167 (patch) | |
tree | 39d5aae6d5c9991966c16e56a9c4067be4134c2b /lib/asn1/test/error_SUITE.erl | |
parent | d17a84df58177143c89180aeb85373e0d5504210 (diff) | |
download | otp-6d9725178dd44aa0337901b081be93113f988167.tar.gz otp-6d9725178dd44aa0337901b081be93113f988167.tar.bz2 otp-6d9725178dd44aa0337901b081be93113f988167.zip |
Clean up and correct table constraint handling
Diffstat (limited to 'lib/asn1/test/error_SUITE.erl')
-rw-r--r-- | lib/asn1/test/error_SUITE.erl | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl index d83131db92..0fe77e7b22 100644 --- a/lib/asn1/test/error_SUITE.erl +++ b/lib/asn1/test/error_SUITE.erl @@ -23,7 +23,8 @@ classes/1,constraints/1,enumerated/1, imports/1,instance_of/1,integers/1,objects/1, object_field_extraction/1,oids/1,rel_oids/1, - object_sets/1,parameterization/1, syntax/1,values/1]). + object_sets/1,parameterization/1, + syntax/1,table_constraints/1,values/1]). -include_lib("test_server/include/test_server.hrl"). @@ -49,6 +50,7 @@ groups() -> rel_oids, parameterization, syntax, + table_constraints, values]}]. parallel() -> @@ -578,6 +580,44 @@ syntax(Config) -> } = run(P, Config), ok. +table_constraints(Config) -> + M = 'TableConstraints', + P = {M, + <<"TableConstraints DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n" + " Seq-1 ::= SEQUENCE {\n" + " contentType CONTENTS.&id,\n" + " content CONTENTS.&Type({Contents}{@contentType})\n" + " }\n" + + " Seq-2 ::= SEQUENCE {\n" + " contentType INTEGER({Contents}),\n" + " content CONTENTS.&Type({Contents}{@contentType})\n" + " }\n" + + " Seq-3 ::= SEQUENCE {\n" + " contentType INTEGER,\n" + " content CONTENTS.&Type({Contents}{@contentType})\n" + " }\n" + + "Contents CONTENTS ::= {\n" + " {OCTET STRING IDENTIFIED BY {2 1 1}}\n" + "}\n" + + "CONTENTS ::= TYPE-IDENTIFIER\n" + "END\n">>}, + {error, + [{structured_error, + {M,2},asn1ct_check, + {missing_table_constraint,contentType}}, + {structured_error, + {M,6},asn1ct_check, + {missing_ocft,contentType}}, + {structured_error, + {M,10},asn1ct_check, + {missing_ocft,contentType}} + ]} = run(P, Config), + ok. + values(Config) -> M = 'Values', P = {M, |