From 8b68ddddd113ca304690136efb6889fc565aeb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 26 Mar 2013 11:51:59 +0100 Subject: Clean up checking of values for ENUMERATEDs Unify the code for checking an enumeration value named in a DEFAULT and in an ENUMERATED value. There is no need to handle those cases differently. That also will also make sure that the following works: E ::= ENUMERATED { x, ..., y } e E ::= x (Extensible ENUMERATEDs were not handled when defining values.) Always generate an error when an unknown enumeration value is given (used in a DEFAULT, a message would be printed, but the compilation would succeed). Also make sure that we always include the line number for the incorrect enumeration. Write a new test case and remove the extremely rudimentary value_bad_enum_test/1 test case. --- lib/asn1/test/asn1_SUITE.erl | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib/asn1/test/asn1_SUITE.erl') diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl index 2b3ff07980..6be493320c 100644 --- a/lib/asn1/test/asn1_SUITE.erl +++ b/lib/asn1/test/asn1_SUITE.erl @@ -139,7 +139,6 @@ groups() -> testSetOfCho, testEnumExt, value_test, - value_bad_enum_test, testSeq2738, % Uses 'Constructed' {group, [], [constructed, @@ -741,11 +740,6 @@ value_test(Config, Rule, Opts) -> {ok, _} = asn1ct:test('ObjIdValues', 'ObjIdType', 'ObjIdValues':'mobileDomainId'()). -value_bad_enum_test(Config) -> - {error, _} = asn1ct:compile(?config(data_dir, Config) ++ - "BadEnumValue1", - [{outdir, ?config(case_dir, Config)}]). - constructed(Config) -> test(Config, fun constructed/3, [ber]). constructed(Config, Rule, Opts) -> -- cgit v1.2.3