diff options
author | Björn Gustavsson <[email protected]> | 2014-08-21 14:33:13 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-09-01 14:37:15 +0200 |
commit | 9b786fc3114723d71383b184c4824d4498a1e6af (patch) | |
tree | 0751b28d73f17e18378efc83e35e085b94c6e153 /lib/asn1/test | |
parent | f94cfe594e449799b1e97829483551572bb39f63 (diff) | |
download | otp-9b786fc3114723d71383b184c4824d4498a1e6af.tar.gz otp-9b786fc3114723d71383b184c4824d4498a1e6af.tar.bz2 otp-9b786fc3114723d71383b184c4824d4498a1e6af.zip |
Check the formal parameter for parameterized type definitions
Check the formal parameters for a parameterized type definition.
If the governor for a formal parameter is absent, the formal parameter
must be in upper case.
Diffstat (limited to 'lib/asn1/test')
-rw-r--r-- | lib/asn1/test/error_SUITE.erl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl index 8a0414708d..1edd60f7c8 100644 --- a/lib/asn1/test/error_SUITE.erl +++ b/lib/asn1/test/error_SUITE.erl @@ -20,7 +20,8 @@ -module(error_SUITE). -export([suite/0,all/0,groups/0, already_defined/1,bitstrings/1,enumerated/1, - imports/1,instance_of/1,integers/1,objects/1,values/1]). + imports/1,instance_of/1,integers/1,objects/1, + parameterization/1,values/1]). -include_lib("test_server/include/test_server.hrl"). @@ -38,6 +39,7 @@ groups() -> instance_of, integers, objects, + parameterization, values]}]. parallel() -> @@ -219,6 +221,19 @@ objects(Config) -> } = run(P, Config), ok. +parameterization(Config) -> + M = 'Parameterization', + P = {M, + <<"Parameterization DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n" + " NotUppercase{lowercase} ::= INTEGER (lowercase)\n" + "END\n">>}, + {error, + [{structured_error,{'Parameterization',2},asn1ct_check, + {illegal_typereference,lowercase}} + ] + } = run(P, Config), + ok. + values(Config) -> M = 'Values', P = {M, |