aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/error_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-02-25 15:16:34 +0100
committerBjörn Gustavsson <[email protected]>2014-02-28 11:57:05 +0100
commitf4f112c673f87ac7c07928f0681c1d5433491ce7 (patch)
tree17aeb3e47f61dc0ca3fcff5b86877151f0587e86 /lib/asn1/test/error_SUITE.erl
parente45fb925416ae43a3956366bf015aa74b77b7cfe (diff)
downloadotp-f4f112c673f87ac7c07928f0681c1d5433491ce7.tar.gz
otp-f4f112c673f87ac7c07928f0681c1d5433491ce7.tar.bz2
otp-f4f112c673f87ac7c07928f0681c1d5433491ce7.zip
Clean up reporting of errors in IMPORTS
Diffstat (limited to 'lib/asn1/test/error_SUITE.erl')
-rw-r--r--lib/asn1/test/error_SUITE.erl27
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl
index 09327f6e12..8a0414708d 100644
--- a/lib/asn1/test/error_SUITE.erl
+++ b/lib/asn1/test/error_SUITE.erl
@@ -20,7 +20,7 @@
-module(error_SUITE).
-export([suite/0,all/0,groups/0,
already_defined/1,bitstrings/1,enumerated/1,
- instance_of/1,integers/1,objects/1,values/1]).
+ imports/1,instance_of/1,integers/1,objects/1,values/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -34,6 +34,7 @@ groups() ->
[already_defined,
bitstrings,
enumerated,
+ imports,
instance_of,
integers,
objects,
@@ -119,6 +120,30 @@ enumerated(Config) ->
} = run(P, Config),
ok.
+imports(Config) ->
+ Ext = 'ExternalModule',
+ ExtP = {Ext,
+ <<"ExternalModule DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "END\n">>},
+ ok = run(ExtP, Config),
+
+ M = 'Imports',
+ P = {M,
+ <<"Imports DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "IMPORTS NotDefined FROM ExternalModule\n"
+ "X FROM UndefinedModule objid\n"
+ "Y, Z FROM UndefinedModule2;\n"
+ "objid OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) remote-operations(4)\n"
+ " notation(0)}\n"
+ "END\n">>},
+ {error,[{structured_error,{M,2},asn1ct_check,
+ {undefined_import,'NotDefined','ExternalModule'}},
+ {structured_error,{M,3},asn1ct_check,{undefined_import,'X','UndefinedModule'}},
+ {structured_error,{M,4},asn1ct_check,{undefined_import,'Y','UndefinedModule2'}},
+ {structured_error,{M,4},asn1ct_check,{undefined_import,'Z','UndefinedModule2'}}
+ ]} = run(P, Config),
+ ok.
+
instance_of(Config) ->
M = 'InstanceOf',
P = {M,