aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-11-28 10:58:47 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:28 +0100
commit76075cb862d629a9624ab4db98ff876e261fc796 (patch)
treef1c3b4ffec8e9a495fa3554f0de1c98593f035ca /lib/asn1/test
parent2687287372f725dfb99ca6d712b214751c419cc2 (diff)
downloadotp-76075cb862d629a9624ab4db98ff876e261fc796.tar.gz
otp-76075cb862d629a9624ab4db98ff876e261fc796.tar.bz2
otp-76075cb862d629a9624ab4db98ff876e261fc796.zip
Clean up get_unique_fieldname/2
get_unique_fieldname/2 would throw an exception that *all* callers would catch and handle. Since all callers catch the exception, it is much easier to return a special return value. Also use the new error reporting style. While we are at it, remove all catches of {asn1,Error} which are no longer thrown.
Diffstat (limited to 'lib/asn1/test')
-rw-r--r--lib/asn1/test/error_SUITE.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl
index 83ef5f226e..eec0d1e195 100644
--- a/lib/asn1/test/error_SUITE.erl
+++ b/lib/asn1/test/error_SUITE.erl
@@ -339,9 +339,13 @@ object_sets(Config) ->
"TEST-UNIQ ::= CLASS { &id INTEGER UNIQUE, &test INTEGER }\n"
"UniqSet TEST-UNIQ ::= { { &id 1, &test 1 } | {&id 1, &test 2} }\n"
+ "DOUBLE-UNIQ ::= CLASS { &id1 INTEGER UNIQUE,"
+ " &id INTEGER UNIQUE }\n"
+ "DoubleSet DOUBLE-UNIQ ::= { {&id1 1, &id2 2} }\n"
"END\n">>},
{error,
- [{structured_error,{M,3},asn1ct_check,{non_unique_object,1}}
+ [{structured_error,{M,3},asn1ct_check,{non_unique_object,1}},
+ {structured_error,{M,5},asn1ct_check,multiple_uniqs}
]
} = run(P, Config),
ok.