diff options
author | Björn Gustavsson <[email protected]> | 2014-10-01 14:51:37 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:25 +0100 |
commit | 86a2bbe5c88c1be6450b53a2b5cb30a099683762 (patch) | |
tree | 6729cc7855fe80ce39dc642c00dfda765b6b3917 /lib/asn1/test/error_SUITE.erl | |
parent | 07ecfe45e8c22c1d8bde26a39aa833ac6901c348 (diff) | |
download | otp-86a2bbe5c88c1be6450b53a2b5cb30a099683762.tar.gz otp-86a2bbe5c88c1be6450b53a2b5cb30a099683762.tar.bz2 otp-86a2bbe5c88c1be6450b53a2b5cb30a099683762.zip |
Fix object set duplication test
Wrong fields in the record where checked when sorting, which caused
duplicate objects to exist in constructed object sets and later caused
an error.
Diffstat (limited to 'lib/asn1/test/error_SUITE.erl')
-rw-r--r-- | lib/asn1/test/error_SUITE.erl | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl index 35ca9a2f5e..49ba47aed5 100644 --- a/lib/asn1/test/error_SUITE.erl +++ b/lib/asn1/test/error_SUITE.erl @@ -22,8 +22,8 @@ already_defined/1,bitstrings/1, classes/1,constraints/1,enumerated/1, imports/1,instance_of/1,integers/1,objects/1, - object_field_extraction/1,parameterization/1, - syntax/1,values/1]). + object_field_extraction/1, object_sets/1, + parameterization/1, syntax/1,values/1]). -include_lib("test_server/include/test_server.hrl"). @@ -44,6 +44,7 @@ groups() -> integers, objects, object_field_extraction, + object_sets, parameterization, syntax, values]}]. @@ -297,6 +298,20 @@ object_field_extraction(Config) -> } = run(P, Config), ok. +object_sets(Config) -> + M = 'ObjectSets', + P = {M, <<"ObjectSets DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n" + "TEST-UNIQ ::= CLASS { &id INTEGER UNIQUE, &test INTEGER }\n" + "UniqSet TEST-UNIQ ::= { { &id 1, &test 1 } | {&id 1, &test 2} }\n" + + "END\n">>}, + {error, + [{structured_error,{M,3},asn1ct_check,{non_unique_object,1}} + ] + } = run(P, Config), + ok. + + parameterization(Config) -> M = 'Parameterization', P = {M, |