aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Lindberg <[email protected]>2012-02-06 11:57:35 +0100
committerAdam Lindberg <[email protected]>2012-02-28 14:59:32 +0100
commit659fcc5ebd03b72a4081bf0853538800ddf16f86 (patch)
tree4353be135a4cd2e718d5a918cf3e06cd5c925743 /lib
parentaa4e27ebac9eb287069fab859fe5dcdab82c75bf (diff)
downloadotp-659fcc5ebd03b72a4081bf0853538800ddf16f86.tar.gz
otp-659fcc5ebd03b72a4081bf0853538800ddf16f86.tar.bz2
otp-659fcc5ebd03b72a4081bf0853538800ddf16f86.zip
[asn1] Parallelize test suites
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/src/asn1ct_name.erl89
-rw-r--r--lib/asn1/test/Makefile5
-rw-r--r--lib/asn1/test/asn1_SUITE.erl.src2897
-rw-r--r--lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src16
-rw-r--r--lib/asn1/test/asn1_test_lib.erl16
-rw-r--r--lib/asn1/test/ber_decode_error.erl13
-rw-r--r--lib/asn1/test/h323test.erl12
-rw-r--r--lib/asn1/test/testChoExtension.erl12
-rw-r--r--lib/asn1/test/testChoExternal.erl14
-rw-r--r--lib/asn1/test/testChoPrim.erl13
-rw-r--r--lib/asn1/test/testCompactBitString.erl24
-rw-r--r--lib/asn1/test/testConstraints.erl15
-rw-r--r--lib/asn1/test/testContextSwitchingTypes.erl13
-rw-r--r--lib/asn1/test/testDER.erl11
-rw-r--r--lib/asn1/test/testDeepTConstr.erl17
-rw-r--r--lib/asn1/test/testDoubleEllipses.erl14
-rw-r--r--lib/asn1/test/testEnumExt.erl11
-rw-r--r--lib/asn1/test/testExternal.erl35
-rw-r--r--lib/asn1/test/testINSTANCE_OF.erl15
-rw-r--r--lib/asn1/test/testInfObj.erl40
-rw-r--r--lib/asn1/test/testInfObjectClass.erl16
-rw-r--r--lib/asn1/test/testMegaco.erl19
-rw-r--r--lib/asn1/test/testMergeCompile.erl22
-rw-r--r--lib/asn1/test/testMvrasn6.erl44
-rw-r--r--lib/asn1/test/testNBAPsystem.erl87
-rw-r--r--lib/asn1/test/testOpenTypeImplicitTag.erl13
-rw-r--r--lib/asn1/test/testParamBasic.erl10
-rw-r--r--lib/asn1/test/testParameterizedInfObj.erl14
-rw-r--r--lib/asn1/test/testPrim.erl15
-rw-r--r--lib/asn1/test/testPrimExternal.erl13
-rw-r--r--lib/asn1/test/testRANAP.erl16
-rw-r--r--lib/asn1/test/testROSE.erl36
-rw-r--r--lib/asn1/test/testSSLspecs.erl71
-rw-r--r--lib/asn1/test/testSelectionTypes.erl11
-rw-r--r--lib/asn1/test/testSeq2738.erl11
-rw-r--r--lib/asn1/test/testSeqDefault.erl12
-rw-r--r--lib/asn1/test/testSeqExtension.erl13
-rw-r--r--lib/asn1/test/testSeqIndefinite.erl11
-rw-r--r--lib/asn1/test/testSeqSetDefaultVal.erl11
-rw-r--r--lib/asn1/test/testSeqTag.erl13
-rw-r--r--lib/asn1/test/testSeqTypeRefSeq.erl12
-rw-r--r--lib/asn1/test/testSeqTypeRefSet.erl12
-rw-r--r--lib/asn1/test/testSetDefault.erl13
-rw-r--r--lib/asn1/test/testSetIndefinite.erl11
-rw-r--r--lib/asn1/test/testSetOf.erl12
-rw-r--r--lib/asn1/test/testSetOfCho.erl12
-rw-r--r--lib/asn1/test/testSetOfExternal.erl12
-rw-r--r--lib/asn1/test/testSetOfTag.erl12
-rw-r--r--lib/asn1/test/testSetTypeRefCho.erl12
-rw-r--r--lib/asn1/test/testSetTypeRefPrim.erl12
-rw-r--r--lib/asn1/test/testSetTypeRefSeq.erl12
-rw-r--r--lib/asn1/test/testSetTypeRefSet.erl12
-rw-r--r--lib/asn1/test/testTCAP.erl37
-rw-r--r--lib/asn1/test/testTcapsystem.erl90
-rw-r--r--lib/asn1/test/testTypeValueNotation.erl16
-rw-r--r--lib/asn1/test/testX420.erl39
-rw-r--r--lib/asn1/test/test_compile_options.erl13
-rw-r--r--lib/asn1/test/test_driver_load.erl23
-rw-r--r--lib/asn1/test/test_inline.erl70
-rw-r--r--lib/asn1/test/test_modified_x420.erl9
-rw-r--r--lib/asn1/test/test_partial_incomplete_decode.erl39
-rw-r--r--lib/asn1/test/test_selective_decode.erl11
-rw-r--r--lib/asn1/test/test_special_decode_performance.erl19
-rw-r--r--lib/asn1/test/test_undecoded_rest.erl13
-rw-r--r--lib/asn1/test/test_x691.erl19
65 files changed, 1726 insertions, 2556 deletions
diff --git a/lib/asn1/src/asn1ct_name.erl b/lib/asn1/src/asn1ct_name.erl
index a6aa4255cc..3ab6f7b0ed 100644
--- a/lib/asn1/src/asn1ct_name.erl
+++ b/lib/asn1/src/asn1ct_name.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,8 +20,7 @@
-module(asn1ct_name).
%%-compile(export_all).
--export([name_server_loop/1,
- start/0,
+-export([start/0,
stop/0,
push/1,
pop/1,
@@ -35,38 +34,50 @@
new/1]).
start() ->
- start_server(asn1_ns, asn1ct_name,name_server_loop,[[]]).
+ Parent = self(),
+ case get(?MODULE) of
+ undefined ->
+ put(?MODULE, spawn_link(fun() ->
+ Ref = monitor(process, Parent),
+ name_server_loop({Ref,Parent},[])
+ end)),
+ ok;
+ _Pid ->
+ already_started
+ end.
-stop() -> stop_server(asn1_ns).
+stop() ->
+ req(stop),
+ erase(?MODULE).
-name_server_loop(Vars) ->
+name_server_loop({Ref, Parent} = Monitor,Vars) ->
%% io:format("name -- ~w~n",[Vars]),
receive
{From,{current,Variable}} ->
- From ! {asn1_ns,get_curr(Vars,Variable)},
- name_server_loop(Vars);
+ From ! {?MODULE,get_curr(Vars,Variable)},
+ name_server_loop(Monitor,Vars);
{From,{pop,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(pop_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,pop_var(Vars,Variable));
{From,{push,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(push_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,push_var(Vars,Variable));
{From,{delete,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(delete_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,delete_var(Vars,Variable));
{From,{new,Variable}} ->
- From ! {asn1_ns,done},
- name_server_loop(new_var(Vars,Variable));
+ From ! {?MODULE,done},
+ name_server_loop(Monitor,new_var(Vars,Variable));
{From,{prev,Variable}} ->
- From ! {asn1_ns,get_prev(Vars,Variable)},
- name_server_loop(Vars);
+ From ! {?MODULE,get_prev(Vars,Variable)},
+ name_server_loop(Monitor,Vars);
{From,{next,Variable}} ->
- From ! {asn1_ns,get_next(Vars,Variable)},
- name_server_loop(Vars);
+ From ! {?MODULE,get_next(Vars,Variable)},
+ name_server_loop(Monitor,Vars);
+ {'DOWN', Ref, process, Parent, Reason} ->
+ exit(Reason);
{From,stop} ->
- unregister(asn1_ns),
- From ! {asn1_ns,stopped},
- exit(normal)
+ From ! {?MODULE,stopped}
end.
active(V) ->
@@ -76,12 +87,16 @@ active(V) ->
end.
req(Req) ->
- asn1_ns ! {self(), Req},
- receive {asn1_ns, Reply} -> Reply end.
+ get(?MODULE) ! {self(), Req},
+ receive
+ {?MODULE, Reply} -> Reply
+ after 5000 ->
+ exit(name_server_timeout)
+ end.
pop(V) -> req({pop,V}).
push(V) -> req({push,V}).
-clear() -> req(stop), start().
+clear() -> stop(), start().
curr(V) -> req({current,V}).
new(V) -> req({new,V}).
delete(V) -> req({delete,V}).
@@ -209,25 +224,3 @@ get_next(Vars,Variable) ->
_ ->
none
end.
-
-
-stop_server(Name) ->
- stop_server(Name, whereis(Name)).
-stop_server(_Name, undefined) -> stopped;
-stop_server(Name, _Pid) ->
- Name ! {self(), stop},
- receive {Name, _} -> stopped end.
-
-
-start_server(Name,Mod,Fun,Args) ->
- case whereis(Name) of
- undefined ->
- case catch register(Name, spawn(Mod,Fun, Args)) of
- {'EXIT',{badarg,_}} ->
- start_server(Name,Mod,Fun,Args);
- _ ->
- ok
- end;
- _Pid ->
- already_started
- end.
diff --git a/lib/asn1/test/Makefile b/lib/asn1/test/Makefile
index 7ecd544d4b..2e09e32d1e 100644
--- a/lib/asn1/test/Makefile
+++ b/lib/asn1/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2011. All Rights Reserved.
+# Copyright Ericsson AB 1997-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -28,7 +28,6 @@ MODULES= \
h323test \
choice_extension \
ber_decode_error \
- testExternal \
testPrim \
testPrimStrings \
testCompactBitString \
@@ -88,13 +87,11 @@ MODULES= \
testTimer \
testRANAP \
testMegaco \
- testMvrasn6 \
testSeqSetDefaultVal \
testParamBasic \
testContextSwitchingTypes \
testTypeValueNotation \
testOpenTypeImplicitTag \
- testROSE \
testINSTANCE_OF \
test_partial_incomplete_decode \
testDER \
diff --git a/lib/asn1/test/asn1_SUITE.erl.src b/lib/asn1/test/asn1_SUITE.erl.src
index 912170fe12..b3ccedaefc 100644
--- a/lib/asn1/test/asn1_SUITE.erl.src
+++ b/lib/asn1/test/asn1_SUITE.erl.src
@@ -20,30 +20,28 @@
%%% Purpose : Test suite for the ASN.1 application
-module(asn1_%BIN%SUITE).
--define(PER,'%PER%').
--define(BER,'%BER%').
--define(ber_driver(Erule,Func),
- case Erule of
- ber_bin_v2 ->
- Func;
- _ -> ok
- end).
+-define(PER, '%PER%').
+-define(BER, '%BER%').
+-define(ber_driver(Erule, Func),
+ case Erule of
+ ber_bin_v2 -> Func;
+ _ -> ok
+ end).
-define(per_optimize(Erule),
- case Erule of
- ber_bin_v2 ->[optimize];
- _ -> []
- end).
+ case Erule of
+ ber_bin_v2 -> [optimize];
+ _ -> []
+ end).
-define(per_bit_opt(FuncCall),
- case ?BER of
- ber_bin_v2 -> FuncCall;
-% _ -> {skip,"only for bit optimized per_bin"}
- _ -> ok
- end).
+ case ?BER of
+ ber_bin_v2 -> FuncCall;
+ _ -> ok
+ end).
-define(uper_bin(FuncCall),
- case ?PER of
- per -> FuncCall;
- _ -> ok
- end).
+ case ?PER of
+ per -> FuncCall;
+ _ -> ok
+ end).
-compile(export_all).
%%-export([Function/Arity, ...]).
@@ -51,698 +49,770 @@
-include_lib("test_server/include/test_server.hrl").
%% records used by test-case default
--record('Def1',{
-bool0, bool1 = asn1_DEFAULT, bool2 = asn1_DEFAULT, bool3 = asn1_DEFAULT}).
-
-%-record('Def2',{
-%bool10, bool11 = asn1_DEFAULT, bool12 = asn1_DEFAULT, bool13}).
-
-%-record('Def3',{
-%bool30 = asn1_DEFAULT, bool31 = asn1_DEFAULT, bool32 = asn1_DEFAULT, bool33 = asn1_DEFAULT}).
-
-suite() -> [{ct_hooks,[ts_install_cth]}].
-
-all() -> [{group,compile},parse,default_per,default_ber,default_per_opt,per,
- {group,ber},testPrim,
- testPrimStrings, testPrimExternal, testChoPrim,
- testChoExtension, testChoExternal, testChoOptional,
- testChoOptionalImplicitTag, testChoRecursive,
- testChoTypeRefCho, testChoTypeRefPrim, testChoTypeRefSeq,
- testChoTypeRefSet, testDef, testOpt, testSeqDefault,
- testSeqExtension, testSeqExternal, testSeqOptional,
- testSeqPrim, testSeqTag, testSeqTypeRefCho,
- testSeqTypeRefPrim, testSeqTypeRefSeq, testSeqTypeRefSet,
- testSeqOf, testSeqOfIndefinite, testSeqOfCho,
- testSeqOfExternal, testSetDefault, testSetExtension,
- testExtensionAdditionGroup,
- testSetExternal, testSeqOfTag, testSetOptional, testSetPrim,
- testSetTag, testSetTypeRefCho, testSetTypeRefPrim,
- testSetTypeRefSeq, testSetTypeRefSet, testSetOf, testSetOfCho,
- testSetOfExternal, testSetOfTag, testEnumExt, value_test,
- testSeq2738, constructed, ber_decode_error,
- h323test, testSeqIndefinite, testSetIndefinite,
- testChoiceIndefinite,
- per_GeneralString, per_open_type, testInfObjectClass,
- testParameterizedInfObj, testMergeCompile, testobj,
- testDeepTConstr, testConstraints,
- testInvokeMod, testExport, testImport, testCompactBitString,
- testMegaco, testParamBasic, testMvrasn6,
- testContextSwitchingTypes, testTypeValueNotation,
- testOpenTypeImplicitTag,duplicate_tags,rtUI,testROSE,
- testINSTANCE_OF,testTCAP,testDER,specialized_decodes,
- special_decode_performance,test_driver_load,
- test_ParamTypeInfObj, test_WS_ParamClass,
- test_Defed_ObjectIdentifier, testSelectionType,
- testSSLspecs, testNortel,test_undecoded_rest,
- test_inline, testTcapsystem, testNBAPsystem,
- test_compile_options,testDoubleEllipses, test_modified_x420,
- testX420, test_x691,ticket_6143, testExtensionAdditionGroup,
- test_OTP_9688
- ] ++ common() ++ particular().
-
-groups() ->
- [
- {compile, [],
- [c_syntax, c_string_per, c_string_ber,
+-record('Def1', {bool0,
+ bool1 = asn1_DEFAULT,
+ bool2 = asn1_DEFAULT,
+ bool3 = asn1_DEFAULT}).
+
+suite() -> [{ct_hooks, [ts_install_cth]}].
+
+all() -> [{group, parallel}] ++ common() ++ particular().
+
+groups() ->
+ [{compile, parallel([]),
+ [c_syntax,
+ % Uses 'String'
+ {group, [], [c_string_per,
+ c_string_ber]},
c_implicit_before_choice]},
- {ber, [],
- [ber_choiceinseq, ber_optional, ber_optional_keyed_list,
+
+ {ber, parallel([]),
+ [ber_choiceinseq,
+ % Uses 'SOpttest'
+ {group, [], [ber_optional,
+ ber_optional_keyed_list]},
ber_other]},
- {app_test, [], [{asn1_app_test, all}]},
- {appup_test, [], [{asn1_appup_test, all}]}
+
+ {app_test, [],
+ [{asn1_app_test, all}]},
+
+ {appup_test, [],
+ [{asn1_appup_test, all}]},
+
+ {parallel, parallel([]),
+ [{group, compile},
+ {group, ber},
+ % Uses 'Prim'
+ {group, [], [testPrim,
+ rtUI]},
+ % Uses 'P-Record', 'Constraints', 'MEDIA-GATEWAY-CONTROL'...
+ {group, [], [parse,
+ test_driver_load,
+ test_undecoded_rest,
+ test_inline,
+ specialized_decodes,
+ special_decode_performance,
+ testMegaco,
+ testConstraints,
+ testCompactBitString]},
+ % Uses 'Def'
+ {group, [], [default_ber,
+ default_per,
+ default_per_opt]},
+ per,
+ {group, [], [testPrimStrings,
+ testInvokeMod]},
+ testChoPrim,
+ testChoExtension,
+ testChoOptional,
+ testChoOptionalImplicitTag,
+ testChoRecursive,
+ testChoTypeRefCho,
+ testChoTypeRefPrim,
+ testChoTypeRefSeq,
+ testChoTypeRefSet,
+ testDef,
+ testOpt,
+ testSeqDefault,
+ % Uses 'External'
+ {group, [], [testChoExternal,
+ testPrimExternal,
+ testSeqExtension,
+ testSeqExternal,
+ testSeqOfExternal,
+ testSeqTag,
+ testSetExternal,
+ testSetOfExternal,
+ testSetOfTag,
+ testSetTag]},
+ testSeqOptional,
+ testSeqPrim,
+ testSeqTypeRefCho,
+ % Uses 'SeqTypeRefPrim'
+ {group, [], [testSeqTypeRefPrim,
+ testTypeValueNotation]},
+ testSeqTypeRefSeq,
+ testSeqTypeRefSet,
+ % Uses 'SeqOf'
+ {group, [], [testSeqOf,
+ testSeqOfIndefinite]}, % Uses 'Mvrasn*'
+ testSeqOfCho,
+ testSetDefault,
+ testSetExtension,
+ testExtensionAdditionGroup,
+ testSeqOfTag,
+ testSetOptional,
+ testSetPrim,
+ testSetTypeRefCho,
+ testSetTypeRefPrim,
+ testSetTypeRefSeq,
+ testSetTypeRefSet,
+ testSetOf,
+ testSetOfCho,
+ testEnumExt,
+ value_test,
+ testSeq2738,
+ % Uses 'Constructed'
+ {group, [], [constructed,
+ ber_decode_error]},
+ % Uses 'MULTIMEDIA-SYSTEM-CONTROL'
+ {group, [], [h323test,
+ per_GeneralString]},
+ % Uses 'SeqSetIndefinite'
+ {group, [], [testSeqIndefinite,
+ testSetIndefinite]},
+ testChoiceIndefinite,
+ per_open_type,
+ testInfObjectClass,
+ testParameterizedInfObj,
+ testMergeCompile,
+ testobj,
+ testDeepTConstr,
+ testExport,
+ testImport,
+ % Uses 'ParamBasic'
+ {group, [], [testParamBasic,
+ testDER]},
+ testMvrasn6,
+ testContextSwitchingTypes,
+ testOpenTypeImplicitTag,
+ duplicate_tags,
+ testROSE,
+ testINSTANCE_OF,
+ testTCAP,
+ test_ParamTypeInfObj,
+ test_WS_ParamClass,
+ test_Defed_ObjectIdentifier,
+ testSelectionType,
+ testSSLspecs,
+ testNortel,
+ % Uses 'PKCS7'
+ {group, [], [test_modified_x420,
+ testX420]},
+ testTcapsystem,
+ testNBAPsystem,
+ test_compile_options,
+ testDoubleEllipses,
+ test_x691,
+ ticket_6143,
+ testExtensionAdditionGroup,
+ test_OTP_9688]}
].
+parallel(Options) ->
+ case erlang:system_info(smp_support) andalso
+ erlang:system_info(schedulers) > 1 of
+ true -> [parallel|Options];
+ false -> Options
+ end.
+
init_per_suite(Config) ->
- io:format("code:lib_dir(asn1) = ~p~n",[code:lib_dir(asn1)]),
+ io:format("code:lib_dir(asn1) = ~p~n", [code:lib_dir(asn1)]),
Config.
end_per_suite(_Config) ->
ok.
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
-
+ Config.
-%all(suite) -> [test_inline,testNBAPsystem,test_compile_options,ticket_6143].
+init_per_testcase(Func, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ true = code:add_patha(PrivDir),
+ CaseDir = filename:join([PrivDir, ?MODULE, Func]),
+ ok = filelib:ensure_dir(filename:join([CaseDir, dummy_file])),
+ true = code:add_patha(CaseDir),
-init_per_testcase(Func,Config) ->
- %%?line test_server:format("Func: ~p~n",[Func]),
- ?line {ok, _} = file:read_file_info(filename:join([?config(priv_dir,Config)])),
- ?line code:add_patha(?config(priv_dir,Config)),
- Dog=
- case Func of
- testX420 ->
- test_server:timetrap({minutes,60}); % 60 minutes
- _ ->
- test_server:timetrap({minutes,30}) % 60 minutes
- end,
-%% Dog=test_server:timetrap(1800000), % 30 minutes
- [{watchdog, Dog}|Config].
+ Dog = case Func of
+ testX420 -> test_server:timetrap({minutes, 60});
+ _ -> test_server:timetrap({minutes, 30})
+ end,
+ [{case_dir, CaseDir}, {watchdog, Dog}|Config].
-end_per_testcase(_Func,Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog).
+end_per_testcase(_Func, Config) ->
+ Dog = ?config(watchdog, Config),
+ % TODO: Clean up case_dir + code path?
+ test_server:timetrap_cancel(Dog).
testPrim(suite) -> [];
testPrim(Config) ->
- ?line testPrim:compile(Config,?BER,[]),
- ?line testPrim_cases(?BER),
- ?line ?ber_driver(?BER,testPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrim_cases(?BER)),
- ?line testPrim:compile(Config,?PER,[]),
- ?line testPrim_cases(?PER),
- ?line ?per_bit_opt(testPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrim_cases(?PER)),
- ?line ?uper_bin(testPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrim_cases(uper_bin)),
- ?line testPrim:compile(Config,?PER,[optimize]),
- ?line testPrim_cases(?PER).
+ Files = ["Prim", "Real"],
+
+ asn1_test_lib:compile_all(Files, Config, [?BER]),
+ testPrim_cases(?BER),
+
+ ?ber_driver(?BER, asn1_test_lib:compile_all(Files, Config, [?BER, driver])),
+ ?ber_driver(?BER, testPrim_cases(?BER)),
+
+ asn1_test_lib:compile_all(Files, Config, [?PER]),
+ testPrim_cases(?PER),
+
+ ?per_bit_opt(asn1_test_lib:compile_all(Files, Config, [?PER, optimize])),
+ ?per_bit_opt(testPrim_cases(?PER)),
+
+ ?uper_bin(asn1_test_lib:compile_all(Files, Config, [uper_bin])),
+ ?uper_bin(testPrim_cases(uper_bin)),
+
+ asn1_test_lib:compile_all(Files, Config, [?PER, optimize]),
+ testPrim_cases(?PER).
testPrim_cases(Rules) ->
- ?line testPrim:bool(Rules),
- ?line testPrim:int(Rules),
- ?line testPrim:enum(Rules),
- ?line testPrim:obj_id(Rules),
- ?line testPrim:rel_oid(Rules),
- ?line testPrim:null(Rules),
- ?line testPrim:real(Rules).
+ testPrim:bool(Rules),
+ testPrim:int(Rules),
+ testPrim:enum(Rules),
+ testPrim:obj_id(Rules),
+ testPrim:rel_oid(Rules),
+ testPrim:null(Rules),
+ testPrim:real(Rules).
testCompactBitString(suite) -> [];
-testCompactBitString(Config) ->
+testCompactBitString(Config) ->
+ testCompactBitString:compile(Config, [?BER, compact_bit_string]),
+ testCompactBitString:compact_bit_string(?BER),
- ?line testCompactBitString:compile(Config,?BER,[compact_bit_string]),
- ?line testCompactBitString:compact_bit_string(?BER),
+ ?ber_driver(?BER, testCompactBitString:compile(Config, [?BER, compact_bit_string, driver])),
+ ?ber_driver(?BER, testCompactBitString:compact_bit_string(?BER)),
- ?line ?ber_driver(?BER,testCompactBitString:compile(Config,?BER,[compact_bit_string,driver])),
- ?line ?ber_driver(?BER,testCompactBitString:compact_bit_string(?BER)),
+ testCompactBitString:compile(Config, [?PER, compact_bit_string]),
+ testCompactBitString:compact_bit_string(?PER),
+ testCompactBitString:bit_string_unnamed(?PER),
- ?line testCompactBitString:compile(Config,?PER,[compact_bit_string]),
- ?line testCompactBitString:compact_bit_string(?PER),
- ?line testCompactBitString:bit_string_unnamed(?PER),
+ ?per_bit_opt(testCompactBitString:compile(Config, [?PER, compact_bit_string, optimize])),
+ ?per_bit_opt(testCompactBitString:compact_bit_string(?PER)),
+ ?per_bit_opt(testCompactBitString:bit_string_unnamed(?PER)),
+ ?per_bit_opt(testCompactBitString:ticket_7734(?PER)),
- ?line ?per_bit_opt(testCompactBitString:compile(Config,?PER,
- [compact_bit_string,optimize])),
- ?line ?per_bit_opt(testCompactBitString:compact_bit_string(?PER)),
- ?line ?per_bit_opt(testCompactBitString:bit_string_unnamed(?PER)),
- ?line ?per_bit_opt(testCompactBitString:ticket_7734(?PER)),
+ ?uper_bin(testCompactBitString:compile(Config, [uper_bin, compact_bit_string])),
+ ?uper_bin(testCompactBitString:compact_bit_string(uper_bin)),
+ ?uper_bin(testCompactBitString:bit_string_unnamed(uper_bin)),
- ?line ?uper_bin(testCompactBitString:compile(Config,uper_bin,
- [compact_bit_string])),
- ?line ?uper_bin(testCompactBitString:compact_bit_string(uper_bin)),
- ?line ?uper_bin(testCompactBitString:bit_string_unnamed(uper_bin)),
+ testCompactBitString:compile(Config, [?PER, optimize, compact_bit_string]),
+ testCompactBitString:compact_bit_string(?PER),
+ testCompactBitString:bit_string_unnamed(?PER),
- ?line testCompactBitString:compile(Config,?PER,[optimize,compact_bit_string]),
- ?line testCompactBitString:compact_bit_string(?PER),
- ?line testCompactBitString:bit_string_unnamed(?PER),
-
- ?line testCompactBitString:otp_4869(?PER).
+ testCompactBitString:otp_4869(?PER).
testPrimStrings(suite) -> [];
testPrimStrings(Config) ->
- ?line testPrimStrings:compile(Config,?BER,[]),
- ?line testPrimStrings_cases(?BER),
- ?line testPrimStrings:more_strings(?BER), %% these are not implemented in per yet
- ?line ?ber_driver(?BER,testPrimStrings:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrimStrings_cases(?BER)),
- ?line ?ber_driver(?BER,testPrimStrings:more_strings(?BER)),
+ testPrimStrings:compile(Config, ?BER, []),
+ testPrimStrings_cases(?BER),
+ testPrimStrings:more_strings(?BER), %% these are not implemented in per yet
+ ?ber_driver(?BER, testPrimStrings:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testPrimStrings_cases(?BER)),
+ ?ber_driver(?BER, testPrimStrings:more_strings(?BER)),
- ?line testPrimStrings:compile(Config,?PER,[]),
- ?line testPrimStrings_cases(?PER),
+ testPrimStrings:compile(Config, ?PER, []),
+ testPrimStrings_cases(?PER),
- ?line ?per_bit_opt(testPrimStrings:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrimStrings_cases(?PER)),
+ ?per_bit_opt(testPrimStrings:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testPrimStrings_cases(?PER)),
- ?line ?uper_bin(testPrimStrings:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrimStrings_cases(uper_bin)),
+ ?uper_bin(testPrimStrings:compile(Config, uper_bin, [])),
+ ?uper_bin(testPrimStrings_cases(uper_bin)),
- ?line testPrimStrings:compile(Config,?PER,[optimize]),
- ?line testPrimStrings_cases(?PER).
+ testPrimStrings:compile(Config, ?PER, [optimize]),
+ testPrimStrings_cases(?PER).
testPrimStrings_cases(Rules) ->
- ?line testPrimStrings:bit_string(Rules),
- ?line testPrimStrings:bit_string_unnamed(Rules),
- ?line testPrimStrings:octet_string(Rules),
- ?line testPrimStrings:numeric_string(Rules),
- ?line testPrimStrings:other_strings(Rules),
- ?line testPrimStrings:universal_string(Rules),
- ?line testPrimStrings:bmp_string(Rules),
- ?line testPrimStrings:times(Rules),
- ?line testPrimStrings:utf8_string(Rules).
-
+ testPrimStrings:bit_string(Rules),
+ testPrimStrings:bit_string_unnamed(Rules),
+ testPrimStrings:octet_string(Rules),
+ testPrimStrings:numeric_string(Rules),
+ testPrimStrings:other_strings(Rules),
+ testPrimStrings:universal_string(Rules),
+ testPrimStrings:bmp_string(Rules),
+ testPrimStrings:times(Rules),
+ testPrimStrings:utf8_string(Rules).
+
testPrimExternal(suite) -> [];
testPrimExternal(Config) ->
+ asn1_test_lib:compile("External", Config, [?BER]),
+ asn1_test_lib:compile("PrimExternal", Config, [?BER]),
+ testPrimExternal:external(?BER),
- ?line testExternal:compile(Config,?BER,[]),
- ?line testPrimExternal:compile(Config,?BER,[]),
- ?line testPrimExternal_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("PrimExternal", Config, [?BER, driver])),
+ ?ber_driver(?BER, testPrimExternal:external(?BER)),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrimExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testPrimExternal_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testPrimExternal:compile(Config,?PER,[]),
- ?line testPrimExternal_cases(?PER),
+ asn1_test_lib:compile("External", Config, [?PER]),
+ asn1_test_lib:compile("PrimExternal", Config, [?PER]),
+ testPrimExternal:external(?PER),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrimExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testPrimExternal_cases(?PER)),
-
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrimExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testPrimExternal_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testPrimExternal:compile(Config,?PER,[optimize]),
- ?line testPrimExternal_cases(?PER).
-
-testPrimExternal_cases(Rules) ->
- ?line testPrimExternal:external(Rules).
+ ?per_bit_opt(asn1_test_lib:compile("External", Config, [?PER, optimize])),
+ ?per_bit_opt(asn1_test_lib:compile("PrimExternal", Config, [?PER, optimize])),
+ ?per_bit_opt(testPrimExternal:external(?PER)),
+ ?uper_bin(asn1_test_lib:compile("External", Config, [uper_bin])),
+ ?uper_bin(asn1_test_lib:compile("PrimExternal", Config, [uper_bin])),
+ ?uper_bin(testPrimExternal:external(uper_bin)),
+ asn1_test_lib:compile("External", Config, [?PER, optimize]),
+ asn1_test_lib:compile("PrimExternal", Config, [?PER, optimize]),
+ testPrimExternal:external(?PER).
testChoPrim(suite) -> [];
testChoPrim(Config) ->
+ asn1_test_lib:compile("ChoPrim", Config, [?BER]),
+ testChoPrim_cases(?BER),
- ?line testChoPrim:compile(Config,?BER,[]),
- ?line testChoPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testChoPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoPrim_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("ChoPrim", Config, [?BER, driver])),
+ ?ber_driver(?BER, testChoPrim_cases(?BER)),
- ?line testChoPrim:compile(Config,?PER,[]),
- ?line testChoPrim_cases(?PER),
+ asn1_test_lib:compile("ChoPrim", Config, [?PER]),
+ testChoPrim_cases(?PER),
- ?line ?per_bit_opt(testChoPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoPrim_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("ChoPrim", Config, [?PER, optimize])),
+ ?per_bit_opt(testChoPrim_cases(?PER)),
- ?line ?uper_bin(testChoPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoPrim_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("ChoPrim", Config, [uper_bin])),
+ ?uper_bin(testChoPrim_cases(uper_bin)),
- ?line testChoPrim:compile(Config,?PER,[optimize]),
- ?line testChoPrim_cases(?PER).
+ asn1_test_lib:compile("ChoPrim", Config, [?PER, optimize]),
+ testChoPrim_cases(?PER).
testChoPrim_cases(Rules) ->
- ?line testChoPrim:bool(Rules),
- ?line testChoPrim:int(Rules).
+ testChoPrim:bool(Rules),
+ testChoPrim:int(Rules).
testChoExtension(suite) -> [];
testChoExtension(Config) ->
+ asn1_test_lib:compile("ChoExtension", Config, [?BER]),
+ testChoExtension_cases(?BER),
- ?line testChoExtension:compile(Config,?BER,[]),
- ?line testChoExtension_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("ChoExtension", Config, [?BER, driver])),
+ ?ber_driver(?BER, testChoExtension_cases(?BER)),
- ?line ?ber_driver(?BER,testChoExtension:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoExtension_cases(?BER)),
+ asn1_test_lib:compile("ChoExtension", Config, [?PER]),
+ testChoExtension_cases(?PER),
- ?line testChoExtension:compile(Config,?PER,[]),
- ?line testChoExtension_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("ChoExtension", Config, [?PER, optimize])),
+ ?per_bit_opt(testChoExtension_cases(?PER)),
- ?line ?per_bit_opt(testChoExtension:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoExtension_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("ChoExtension", Config, [uper_bin])),
+ ?uper_bin(testChoExtension_cases(uper_bin)),
- ?line ?uper_bin(testChoExtension:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoExtension_cases(uper_bin)),
-
- ?line testChoExtension:compile(Config,?PER,[optimize]),
- ?line testChoExtension_cases(?PER).
+ asn1_test_lib:compile("ChoExtension", Config, [?PER, optimize]),
+ testChoExtension_cases(?PER).
testChoExtension_cases(Rules) ->
- ?line testChoExtension:extension(Rules).
+ testChoExtension:extension(Rules).
testChoExternal(suite) -> [];
testChoExternal(Config) ->
+ asn1_test_lib:compile("External", Config, [?BER]),
+ asn1_test_lib:compile("ChoExternal", Config, [?BER]),
+ testChoExternal:external(?BER),
- ?line testExternal:compile(Config,?BER,[]),
- ?line testChoExternal:compile(Config,?BER,[]),
- ?line testChoExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoExternal_cases(?BER)),
-
- ?line testExternal:compile(Config,?PER,[]),
- ?line testChoExternal:compile(Config,?PER,[]),
- ?line testChoExternal_cases(?PER),
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("ChoExternal", Config, [?BER, driver])),
+ ?ber_driver(?BER, testChoExternal:external(?BER)),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoExternal_cases(?PER)),
+ asn1_test_lib:compile("External", Config, [?PER]),
+ asn1_test_lib:compile("ChoExternal", Config, [?PER]),
+ testChoExternal:external(?PER),
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoExternal_cases(uper_bin)),
+ ?per_bit_opt(asn1_test_lib:compile("External", Config, [?PER, optimize])),
+ ?per_bit_opt(asn1_test_lib:compile("ChoExternal", Config, [?PER, optimize])),
+ ?per_bit_opt(testChoExternal:external(?PER)),
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testChoExternal:compile(Config,?PER,[optimize]),
- ?line testChoExternal_cases(?PER).
-
-
-testChoExternal_cases(Rules) ->
- ?line testChoExternal:external(Rules).
+ ?uper_bin(asn1_test_lib:compile("External", Config, [uper_bin])),
+ ?uper_bin(asn1_test_lib:compile("ChoExternal", Config, [uper_bin])),
+ ?uper_bin(testChoExternal:external(uper_bin)),
+ asn1_test_lib:compile("External", Config, [?PER, optimize]),
+ asn1_test_lib:compile("ChoExternal", Config, [?PER, optimize]),
+ testChoExternal:external(?PER).
testChoOptional(suite) -> [];
testChoOptional(Config) ->
- ?line testChoOptional:compile(Config,?BER,[]),
- ?line testChoOptional_cases(?BER),
+ testChoOptional:compile(Config, ?BER, []),
+ testChoOptional_cases(?BER),
- ?line ?ber_driver(?BER,testChoOptional:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoOptional_cases(?BER)),
+ ?ber_driver(?BER, testChoOptional:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testChoOptional_cases(?BER)),
- ?line testChoOptional:compile(Config,?PER,[]),
- ?line testChoOptional_cases(?PER),
+ testChoOptional:compile(Config, ?PER, []),
+ testChoOptional_cases(?PER),
- ?line ?per_bit_opt(testChoOptional:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoOptional_cases(?PER)),
+ ?per_bit_opt(testChoOptional:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testChoOptional_cases(?PER)),
- ?line ?uper_bin(testChoOptional:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoOptional_cases(uper_bin)),
+ ?uper_bin(testChoOptional:compile(Config, uper_bin, [])),
+ ?uper_bin(testChoOptional_cases(uper_bin)),
- ?line testChoOptional:compile(Config,?PER,[optimize]),
- ?line testChoOptional_cases(?PER).
+ testChoOptional:compile(Config, ?PER, [optimize]),
+ testChoOptional_cases(?PER).
testChoOptional_cases(Rules) ->
- ?line testChoOptional:optional(Rules).
+ testChoOptional:optional(Rules).
testChoOptionalImplicitTag(suite) -> [];
testChoOptionalImplicitTag(Config) ->
%% Only meaningful for ?BER
- ?line testChoOptionalImplicitTag:compile(Config,?BER),
- ?line testChoOptionalImplicitTag:optional(?BER).
+ testChoOptionalImplicitTag:compile(Config, ?BER),
+ testChoOptionalImplicitTag:optional(?BER).
testChoRecursive(suite) -> [];
testChoRecursive(Config) ->
- ?line testChoRecursive:compile(Config,?BER,[]),
- ?line testChoRecursive_cases(?BER),
+ testChoRecursive:compile(Config, ?BER, []),
+ testChoRecursive_cases(?BER),
- ?line ?ber_driver(?BER,testChoRecursive:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoRecursive_cases(?BER)),
+ ?ber_driver(?BER, testChoRecursive:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testChoRecursive_cases(?BER)),
- ?line testChoRecursive:compile(Config,?PER,[]),
- ?line testChoRecursive_cases(?PER),
+ testChoRecursive:compile(Config, ?PER, []),
+ testChoRecursive_cases(?PER),
- ?line ?per_bit_opt(testChoRecursive:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoRecursive_cases(?PER)),
+ ?per_bit_opt(testChoRecursive:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testChoRecursive_cases(?PER)),
- ?line ?uper_bin(testChoRecursive:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoRecursive_cases(uper_bin)),
+ ?uper_bin(testChoRecursive:compile(Config, uper_bin, [])),
+ ?uper_bin(testChoRecursive_cases(uper_bin)),
- ?line testChoRecursive:compile(Config,?PER,[optimize]),
- ?line testChoRecursive_cases(?PER).
+ testChoRecursive:compile(Config, ?PER, [optimize]),
+ testChoRecursive_cases(?PER).
testChoRecursive_cases(Rules) ->
- ?line testChoRecursive:recursive(Rules).
+ testChoRecursive:recursive(Rules).
testChoTypeRefCho(suite) -> [];
testChoTypeRefCho(Config) ->
- ?line testChoTypeRefCho:compile(Config,?BER,[]),
- ?line testChoTypeRefCho_cases(?BER),
+ testChoTypeRefCho:compile(Config, ?BER, []),
+ testChoTypeRefCho_cases(?BER),
- ?line ?ber_driver(?BER,testChoTypeRefCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefCho_cases(?BER)),
+ ?ber_driver(?BER, testChoTypeRefCho:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testChoTypeRefCho_cases(?BER)),
- ?line testChoTypeRefCho:compile(Config,?PER,[]),
- ?line testChoTypeRefCho_cases(?PER),
+ testChoTypeRefCho:compile(Config, ?PER, []),
+ testChoTypeRefCho_cases(?PER),
- ?line ?per_bit_opt(testChoTypeRefCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefCho_cases(?PER)),
+ ?per_bit_opt(testChoTypeRefCho:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testChoTypeRefCho_cases(?PER)),
- ?line ?uper_bin(testChoTypeRefCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefCho_cases(uper_bin)),
+ ?uper_bin(testChoTypeRefCho:compile(Config, uper_bin, [])),
+ ?uper_bin(testChoTypeRefCho_cases(uper_bin)),
- ?line testChoTypeRefCho:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefCho_cases(?PER).
+ testChoTypeRefCho:compile(Config, ?PER, [optimize]),
+ testChoTypeRefCho_cases(?PER).
testChoTypeRefCho_cases(Rules) ->
- ?line testChoTypeRefCho:choice(Rules).
+ testChoTypeRefCho:choice(Rules).
testChoTypeRefPrim(suite) -> [];
testChoTypeRefPrim(Config) ->
- ?line testChoTypeRefPrim:compile(Config,?BER,[]),
- ?line testChoTypeRefPrim_cases(?BER),
+ testChoTypeRefPrim:compile(Config, ?BER, []),
+ testChoTypeRefPrim_cases(?BER),
- ?line ?ber_driver(?BER,testChoTypeRefPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefPrim_cases(?BER)),
+ ?ber_driver(?BER, testChoTypeRefPrim:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testChoTypeRefPrim_cases(?BER)),
- ?line testChoTypeRefPrim:compile(Config,?PER,[]),
- ?line testChoTypeRefPrim_cases(?PER),
+ testChoTypeRefPrim:compile(Config, ?PER, []),
+ testChoTypeRefPrim_cases(?PER),
- ?line ?per_bit_opt(testChoTypeRefPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefPrim_cases(?PER)),
+ ?per_bit_opt(testChoTypeRefPrim:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testChoTypeRefPrim_cases(?PER)),
- ?line ?uper_bin(testChoTypeRefPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefPrim_cases(uper_bin)),
+ ?uper_bin(testChoTypeRefPrim:compile(Config, uper_bin, [])),
+ ?uper_bin(testChoTypeRefPrim_cases(uper_bin)),
- ?line testChoTypeRefPrim:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefPrim_cases(?PER).
+ testChoTypeRefPrim:compile(Config, ?PER, [optimize]),
+ testChoTypeRefPrim_cases(?PER).
testChoTypeRefPrim_cases(Rules) ->
- ?line testChoTypeRefPrim:prim(Rules).
+ testChoTypeRefPrim:prim(Rules).
testChoTypeRefSeq(suite) -> [];
testChoTypeRefSeq(Config) ->
- ?line testChoTypeRefSeq:compile(Config,?BER,[]),
- ?line testChoTypeRefSeq_cases(?BER),
+ testChoTypeRefSeq:compile(Config, ?BER, []),
+ testChoTypeRefSeq_cases(?BER),
- ?line ?ber_driver(?BER,testChoTypeRefSeq:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefSeq_cases(?BER)),
+ ?ber_driver(?BER, testChoTypeRefSeq:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testChoTypeRefSeq_cases(?BER)),
- ?line testChoTypeRefSeq:compile(Config,?PER,[]),
- ?line testChoTypeRefSeq_cases(?PER),
+ testChoTypeRefSeq:compile(Config, ?PER, []),
+ testChoTypeRefSeq_cases(?PER),
- ?line ?per_bit_opt(testChoTypeRefSeq:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefSeq_cases(?PER)),
+ ?per_bit_opt(testChoTypeRefSeq:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testChoTypeRefSeq_cases(?PER)),
- ?line ?uper_bin(testChoTypeRefSeq:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefSeq_cases(uper_bin)),
+ ?uper_bin(testChoTypeRefSeq:compile(Config, uper_bin, [])),
+ ?uper_bin(testChoTypeRefSeq_cases(uper_bin)),
- ?line testChoTypeRefSeq:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefSeq_cases(?PER).
+ testChoTypeRefSeq:compile(Config, ?PER, [optimize]),
+ testChoTypeRefSeq_cases(?PER).
testChoTypeRefSeq_cases(Rules) ->
- ?line testChoTypeRefSeq:seq(Rules).
+ testChoTypeRefSeq:seq(Rules).
testChoTypeRefSet(suite) -> [];
testChoTypeRefSet(Config) ->
- ?line testChoTypeRefSet:compile(Config,?BER,[]),
- ?line testChoTypeRefSet_cases(?BER),
+ testChoTypeRefSet:compile(Config, ?BER, []),
+ testChoTypeRefSet_cases(?BER),
- ?line ?ber_driver(?BER,testChoTypeRefSet:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoTypeRefSet_cases(?BER)),
+ ?ber_driver(?BER, testChoTypeRefSet:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testChoTypeRefSet_cases(?BER)),
- ?line testChoTypeRefSet:compile(Config,?PER,[]),
- ?line testChoTypeRefSet_cases(?PER),
+ testChoTypeRefSet:compile(Config, ?PER, []),
+ testChoTypeRefSet_cases(?PER),
- ?line ?per_bit_opt(testChoTypeRefSet:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testChoTypeRefSet_cases(?PER)),
+ ?per_bit_opt(testChoTypeRefSet:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testChoTypeRefSet_cases(?PER)),
- ?line ?uper_bin(testChoTypeRefSet:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testChoTypeRefSet_cases(uper_bin)),
+ ?uper_bin(testChoTypeRefSet:compile(Config, uper_bin, [])),
+ ?uper_bin(testChoTypeRefSet_cases(uper_bin)),
- ?line testChoTypeRefSet:compile(Config,?PER,[optimize]),
- ?line testChoTypeRefSet_cases(?PER).
+ testChoTypeRefSet:compile(Config, ?PER, [optimize]),
+ testChoTypeRefSet_cases(?PER).
testChoTypeRefSet_cases(Rules) ->
- ?line testChoTypeRefSet:set(Rules).
+ testChoTypeRefSet:set(Rules).
testDef(suite) -> [];
testDef(Config) ->
- ?line testDef:compile(Config,?BER,[]),
- ?line testDef_cases(?BER),
+ testDef:compile(Config, ?BER, []),
+ testDef_cases(?BER),
- ?line ?ber_driver(?BER,testDef:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDef_cases(?BER)),
+ ?ber_driver(?BER, testDef:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testDef_cases(?BER)),
- ?line testDef:compile(Config,?PER,[]),
- ?line testDef_cases(?PER),
+ testDef:compile(Config, ?PER, []),
+ testDef_cases(?PER),
- ?line ?per_bit_opt(testDef:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testDef_cases(?PER)),
+ ?per_bit_opt(testDef:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testDef_cases(?PER)),
- ?line ?uper_bin(testDef:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testDef_cases(uper_bin)),
+ ?uper_bin(testDef:compile(Config, uper_bin, [])),
+ ?uper_bin(testDef_cases(uper_bin)),
- ?line testDef:compile(Config,?PER,[optimize]),
- ?line testDef_cases(?PER).
+ testDef:compile(Config, ?PER, [optimize]),
+ testDef_cases(?PER).
testDef_cases(Rules) ->
- ?line testDef:main(Rules).
+ testDef:main(Rules).
testOpt(suite) -> [];
testOpt(Config) ->
- ?line testOpt:compile(Config,?BER),
- ?line testOpt_cases(?BER),
+ testOpt:compile(Config, ?BER),
+ testOpt_cases(?BER),
- ?line testOpt:compile(Config,?PER),
- ?line testOpt_cases(?PER).
+ testOpt:compile(Config, ?PER),
+ testOpt_cases(?PER).
testOpt_cases(Rules) ->
- ?line testOpt:main(Rules).
+ testOpt:main(Rules).
testEnumExt(suite) -> [];
testEnumExt(Config) ->
- ?line testEnumExt:compile(Config,?BER,[]),
- ?line testEnumExt:main(?BER),
+ asn1_test_lib:compile("EnumExt", Config, [?BER]),
+ testEnumExt:main(?BER),
- ?line ?ber_driver(?BER,testEnumExt:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testEnumExt:main(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("EnumExt", Config, [?BER, driver])),
+ ?ber_driver(?BER, testEnumExt:main(?BER)),
- ?line testEnumExt:compile(Config,?PER,[]),
- ?line testEnumExt:main(?PER),
+ asn1_test_lib:compile("EnumExt", Config, [?PER]),
+ testEnumExt:main(?PER),
- ?line ?per_bit_opt(testEnumExt:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testEnumExt:main(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("EnumExt", Config, [?PER, optimize])),
+ ?per_bit_opt(testEnumExt:main(?PER)),
- ?line ?uper_bin(testEnumExt:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testEnumExt:main(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("EnumExt", Config, [uper_bin])),
+ ?uper_bin(testEnumExt:main(uper_bin)),
- ?line testEnumExt:compile(Config,?PER,[optimize]),
- ?line testEnumExt:main(?PER).
+ asn1_test_lib:compile("EnumExt", Config, [?PER, optimize]),
+ testEnumExt:main(?PER).
testSeqDefault(doc) -> ["Test of OTP-2523 ENUMERATED with extensionmark."];
testSeqDefault(suite) -> [];
testSeqDefault(Config) ->
+ asn1_test_lib:compile("SeqDefault", Config, [?BER]),
+ testSeqDefault_cases(?BER),
- ?line testSeqDefault:compile(Config,?BER,[]),
- ?line testSeqDefault_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqDefault", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqDefault_cases(?BER)),
- ?line ?ber_driver(?BER,testSeqDefault:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqDefault_cases(?BER)),
+ asn1_test_lib:compile("SeqDefault", Config, [?PER]),
+ testSeqDefault_cases(?PER),
- ?line testSeqDefault:compile(Config,?PER,[]),
- ?line testSeqDefault_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("SeqDefault", Config, [?PER, optimize])),
+ ?per_bit_opt(testSeqDefault_cases(?PER)),
- ?line ?per_bit_opt(testSeqDefault:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqDefault_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("SeqDefault", Config, [uper_bin])),
+ ?uper_bin(testSeqDefault_cases(uper_bin)),
- ?line ?uper_bin(testSeqDefault:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqDefault_cases(uper_bin)),
-
- ?line testSeqDefault:compile(Config,?PER,[optimize]),
- ?line testSeqDefault_cases(?PER).
+ asn1_test_lib:compile("SeqDefault", Config, [?PER, optimize]),
+ testSeqDefault_cases(?PER).
testSeqDefault_cases(Rules) ->
- ?line testSeqDefault:main(Rules).
+ testSeqDefault:main(Rules).
testSeqExtension(suite) -> [];
testSeqExtension(Config) ->
+ asn1_test_lib:compile("External", Config, [?BER]),
+ asn1_test_lib:compile("SeqExtension", Config, [?BER]),
+ testSeqExtension_cases(?BER),
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqExtension:compile(Config,?BER,[]),
- ?line testSeqExtension_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExtension:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExtension_cases(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqExtension", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqExtension_cases(?BER)).
testSeqExtension_cases(Rules) ->
- ?line testSeqExtension:main(Rules).
+ testSeqExtension:main(Rules).
testSeqExternal(suite) -> [];
testSeqExternal(Config) ->
+ asn1_test_lib:compile("External", Config, [?BER]),
+ asn1_test_lib:compile("SeqExternal", Config, [?BER]),
+ testSeqExternal_cases(?BER),
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqExternal:compile(Config,?BER,[]),
- ?line testSeqExternal_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqExternal_cases(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqExternal", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqExternal_cases(?BER)).
testSeqExternal_cases(Rules) ->
- ?line testSeqExternal:main(Rules).
+ testSeqExternal:main(Rules).
testSeqOptional(suite) -> [];
testSeqOptional(Config) ->
- ?line testSeqOptional:compile(Config,?BER,[]),
- ?line testSeqOptional_cases(?BER),
+ testSeqOptional:compile(Config, ?BER, []),
+ testSeqOptional_cases(?BER),
- ?line ?ber_driver(?BER,testSeqOptional:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOptional_cases(?BER)),
+ ?ber_driver(?BER, testSeqOptional:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqOptional_cases(?BER)),
- ?line testSeqOptional:compile(Config,?PER,[]),
- ?line testSeqOptional_cases(?PER),
+ testSeqOptional:compile(Config, ?PER, []),
+ testSeqOptional_cases(?PER),
- ?line ?per_bit_opt(testSeqOptional:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOptional_cases(?PER)),
+ ?per_bit_opt(testSeqOptional:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSeqOptional_cases(?PER)),
- ?line ?uper_bin(testSeqOptional:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOptional_cases(uper_bin)),
+ ?uper_bin(testSeqOptional:compile(Config, uper_bin, [])),
+ ?uper_bin(testSeqOptional_cases(uper_bin)),
- ?line testSeqOptional:compile(Config,?PER,[optimize]),
- ?line testSeqOptional_cases(?PER).
+ testSeqOptional:compile(Config, ?PER, [optimize]),
+ testSeqOptional_cases(?PER).
testSeqOptional_cases(Rules) ->
- ?line testSeqOptional:main(Rules).
+ testSeqOptional:main(Rules).
testSeqPrim(suite) -> [];
testSeqPrim(Config) ->
- ?line testSeqPrim:compile(Config,?BER,[]),
- ?line testSeqPrim_cases(?BER),
+ testSeqPrim:compile(Config, ?BER, []),
+ testSeqPrim_cases(?BER),
- ?line ?ber_driver(?BER,testSeqPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqPrim_cases(?BER)),
+ ?ber_driver(?BER, testSeqPrim:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqPrim_cases(?BER)),
- ?line testSeqPrim:compile(Config,?PER,[]),
- ?line testSeqPrim_cases(?PER),
+ testSeqPrim:compile(Config, ?PER, []),
+ testSeqPrim_cases(?PER),
- ?line ?per_bit_opt(testSeqPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqPrim_cases(?PER)),
+ ?per_bit_opt(testSeqPrim:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSeqPrim_cases(?PER)),
- ?line ?uper_bin(testSeqPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqPrim_cases(uper_bin)),
+ ?uper_bin(testSeqPrim:compile(Config, uper_bin, [])),
+ ?uper_bin(testSeqPrim_cases(uper_bin)),
- ?line testSeqPrim:compile(Config,?PER,[optimize]),
- ?line testSeqPrim_cases(?PER).
+ testSeqPrim:compile(Config, ?PER, [optimize]),
+ testSeqPrim_cases(?PER).
testSeqPrim_cases(Rules) ->
- ?line testSeqPrim:main(Rules).
+ testSeqPrim:main(Rules).
testSeq2738(doc) -> ["Test of OTP-2738 Detect corrupt optional component."];
testSeq2738(suite) -> [];
testSeq2738(Config) ->
+ asn1_test_lib:compile("Seq2738", Config, [?BER]),
+ testSeq2738_cases(?BER),
- ?line testSeq2738:compile(Config,?BER,[]),
- ?line testSeq2738_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeq2738:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeq2738_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("Seq2738", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeq2738_cases(?BER)),
- ?line testSeq2738:compile(Config,?PER,[]),
- ?line testSeq2738_cases(?PER),
+ asn1_test_lib:compile("Seq2738", Config, [?PER]),
+ testSeq2738_cases(?PER),
- ?line ?per_bit_opt(testSeq2738:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeq2738_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("Seq2738", Config, [?PER, optimize])),
+ ?per_bit_opt(testSeq2738_cases(?PER)),
- ?line ?uper_bin(testSeq2738:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeq2738_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("Seq2738", Config, [uper_bin])),
+ ?uper_bin(testSeq2738_cases(uper_bin)),
- ?line testSeq2738:compile(Config,?PER,[optimize]),
- ?line testSeq2738_cases(?PER).
+ asn1_test_lib:compile("Seq2738", Config, [?PER, optimize]),
+ testSeq2738_cases(?PER).
testSeq2738_cases(Rules) ->
- ?line testSeq2738:main(Rules).
+ testSeq2738:main(Rules).
testSeqTag(suite) -> [];
testSeqTag(Config) ->
+ asn1_test_lib:compile_all(["External", "SeqTag"], Config, [?BER]),
+ testSeqTag_cases(?BER),
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqTag:compile(Config,?BER,[]),
- ?line testSeqTag_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile_all(["External", "SeqTag"], Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqTag_cases(?BER)),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTag_cases(?BER)),
+ asn1_test_lib:compile_all(["External", "SeqTag"], Config, [?PER]),
+ testSeqTag_cases(?PER),
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSeqTag:compile(Config,?PER,[]),
- ?line testSeqTag_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile_all(["External", "SeqTag"], Config, [?PER, optimize])),
+ ?per_bit_opt(testSeqTag_cases(?PER)),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTag_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile_all(["External", "SeqTag"], Config, [uper_bin])),
+ ?uper_bin(testSeqTag_cases(uper_bin)),
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTag_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSeqTag:compile(Config,?PER,[optimize]),
- ?line testSeqTag_cases(?PER).
+ asn1_test_lib:compile_all(["External", "SeqTag"], Config, [?PER, optimize]),
+ testSeqTag_cases(?PER).
testSeqTag_cases(Rules) ->
- ?line testSeqTag:main(Rules).
+ testSeqTag:main(Rules).
@@ -750,1625 +820,1510 @@ testSeqTag_cases(Rules) ->
testSeqTypeRefCho(suite) -> [];
testSeqTypeRefCho(Config) ->
- ?line testSeqTypeRefCho:compile(Config,?BER,[]),
- ?line testSeqTypeRefCho_cases(?BER),
+ testSeqTypeRefCho:compile(Config, ?BER, []),
+ testSeqTypeRefCho_cases(?BER),
- ?line ?ber_driver(?BER,testSeqTypeRefCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefCho_cases(?BER)),
+ ?ber_driver(?BER, testSeqTypeRefCho:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqTypeRefCho_cases(?BER)),
- ?line testSeqTypeRefCho:compile(Config,?PER,[]),
- ?line testSeqTypeRefCho_cases(?PER),
+ testSeqTypeRefCho:compile(Config, ?PER, []),
+ testSeqTypeRefCho_cases(?PER),
- ?line ?per_bit_opt(testSeqTypeRefCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefCho_cases(?PER)),
+ ?per_bit_opt(testSeqTypeRefCho:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSeqTypeRefCho_cases(?PER)),
- ?line ?uper_bin(testSeqTypeRefCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefCho_cases(uper_bin)),
+ ?uper_bin(testSeqTypeRefCho:compile(Config, uper_bin, [])),
+ ?uper_bin(testSeqTypeRefCho_cases(uper_bin)),
- ?line testSeqTypeRefCho:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefCho_cases(?PER).
+ testSeqTypeRefCho:compile(Config, ?PER, [optimize]),
+ testSeqTypeRefCho_cases(?PER).
testSeqTypeRefCho_cases(Rules) ->
- ?line testSeqTypeRefCho:main(Rules).
+ testSeqTypeRefCho:main(Rules).
testSeqTypeRefPrim(suite) -> [];
testSeqTypeRefPrim(Config) ->
+ asn1_test_lib:compile("SeqTypeRefPrim", Config, [?BER]),
+ testSeqTypeRefPrim_cases(?BER),
- ?line testSeqTypeRefPrim:compile(Config,?BER,[]),
- ?line testSeqTypeRefPrim_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqTypeRefPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefPrim_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqTypeRefPrim", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqTypeRefPrim_cases(?BER)),
- ?line testSeqTypeRefPrim:compile(Config,?PER,[]),
- ?line testSeqTypeRefPrim_cases(?PER),
+ asn1_test_lib:compile("SeqTypeRefPrim", Config, [?PER]),
+ testSeqTypeRefPrim_cases(?PER),
- ?line ?per_bit_opt(testSeqTypeRefPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefPrim_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("SeqTypeRefPrim", Config, [?PER, optimize])),
+ ?per_bit_opt(testSeqTypeRefPrim_cases(?PER)),
- ?line ?uper_bin(testSeqTypeRefPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefPrim_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("SeqTypeRefPrim", Config, [uper_bin])),
+ ?uper_bin(testSeqTypeRefPrim_cases(uper_bin)),
- ?line testSeqTypeRefPrim:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefPrim_cases(?PER).
+ asn1_test_lib:compile("SeqTypeRefPrim", Config, [?PER, optimize]),
+ testSeqTypeRefPrim_cases(?PER).
testSeqTypeRefPrim_cases(Rules) ->
- ?line testSeqTypeRefPrim:main(Rules).
+ testSeqTypeRefPrim:main(Rules).
testSeqTypeRefSeq(suite) -> [];
testSeqTypeRefSeq(Config) ->
+ asn1_test_lib:compile("SeqTypeRefSeq", Config, [?BER]),
+ testSeqTypeRefSeq_cases(?BER),
- ?line testSeqTypeRefSeq:compile(Config,?BER,[]),
- ?line testSeqTypeRefSeq_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqTypeRefSeq", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqTypeRefSeq_cases(?BER)),
- ?line ?ber_driver(?BER,testSeqTypeRefSeq:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefSeq_cases(?BER)),
+ asn1_test_lib:compile("SeqTypeRefSeq", Config, [?PER]),
+ testSeqTypeRefSeq_cases(?PER),
- ?line testSeqTypeRefSeq:compile(Config,?PER,[]),
- ?line testSeqTypeRefSeq_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("SeqTypeRefSeq", Config, [?PER, optimize])),
+ ?per_bit_opt(testSeqTypeRefSeq_cases(?PER)),
- ?line ?per_bit_opt(testSeqTypeRefSeq:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefSeq_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("SeqTypeRefSeq", Config, [uper_bin])),
+ ?uper_bin(testSeqTypeRefSeq_cases(uper_bin)),
- ?line ?uper_bin(testSeqTypeRefSeq:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefSeq_cases(uper_bin)),
-
- ?line testSeqTypeRefSeq:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefSeq_cases(?PER).
+ asn1_test_lib:compile("SeqTypeRefSeq", Config, [?PER, optimize]),
+ testSeqTypeRefSeq_cases(?PER).
testSeqTypeRefSeq_cases(Rules) ->
- ?line testSeqTypeRefSeq:main(Rules).
+ testSeqTypeRefSeq:main(Rules).
testSeqTypeRefSet(suite) -> [];
testSeqTypeRefSet(Config) ->
+ asn1_test_lib:compile("SeqTypeRefSet", Config, [?BER]),
+ testSeqTypeRefSet_cases(?BER),
- ?line testSeqTypeRefSet:compile(Config,?BER,[]),
- ?line testSeqTypeRefSet_cases(?BER),
-
- ?line ?ber_driver(?BER,testSeqTypeRefSet:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqTypeRefSet_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqTypeRefSet", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqTypeRefSet_cases(?BER)),
- ?line testSeqTypeRefSet:compile(Config,?PER,[]),
- ?line testSeqTypeRefSet_cases(?PER),
+ asn1_test_lib:compile("SeqTypeRefSet", Config, [?PER]),
+ testSeqTypeRefSet_cases(?PER),
- ?line ?per_bit_opt(testSeqTypeRefSet:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqTypeRefSet_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("SeqTypeRefSet", Config, [?PER, optimize])),
+ ?per_bit_opt(testSeqTypeRefSet_cases(?PER)),
- ?line ?uper_bin(testSeqTypeRefSet:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqTypeRefSet_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("SeqTypeRefSet", Config, [uper_bin])),
+ ?uper_bin(testSeqTypeRefSet_cases(uper_bin)),
- ?line testSeqTypeRefSet:compile(Config,?PER,[optimize]),
- ?line testSeqTypeRefSet_cases(?PER).
+ asn1_test_lib:compile("SeqTypeRefSet", Config, [?PER, optimize]),
+ testSeqTypeRefSet_cases(?PER).
testSeqTypeRefSet_cases(Rules) ->
- ?line testSeqTypeRefSet:main(Rules).
+ testSeqTypeRefSet:main(Rules).
testSeqOf(suite) -> [];
testSeqOf(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ testSeqOf:compile(Config, ?BER, []),
+ testSeqOf_cases(?BER),
- ?line testSeqOf:compile(Config,?BER,[]),
- ?line testSeqOf_cases(?BER),
+ ?ber_driver(?BER, testSeqOf:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqOf_cases(?BER)),
- ?line ?ber_driver(?BER,testSeqOf:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOf_cases(?BER)),
+ testSeqOf:compile(Config, ?PER, []),
+ testSeqOf_cases(?PER),
- ?line testSeqOf:compile(Config,?PER,[]),
- ?line testSeqOf_cases(?PER),
+ ?per_bit_opt(testSeqOf:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSeqOf_cases(?PER)),
- ?line ?per_bit_opt(testSeqOf:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOf_cases(?PER)),
+ ?uper_bin(testSeqOf:compile(Config, uper_bin, [])),
+ ?uper_bin(testSeqOf_cases(uper_bin)),
- ?line ?uper_bin(testSeqOf:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOf_cases(uper_bin)),
-
- ?line testSeqOf:compile(Config,?PER,[optimize]),
- ?line testSeqOf_cases(?PER).
+ testSeqOf:compile(Config, ?PER, [optimize]),
+ testSeqOf_cases(?PER).
testSeqOf_cases(Rules) ->
- ?line testSeqOf:main(Rules).
+ testSeqOf:main(Rules).
testSeqOfCho(suite) -> [];
testSeqOfCho(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSeqOfCho:compile(Config,?BER,[]),
- ?line testSeqOfCho_cases(?BER),
+ testSeqOfCho:compile(Config, ?BER, []),
+ testSeqOfCho_cases(?BER),
- ?line ?ber_driver(?BER,testSeqOfCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfCho_cases(?BER)),
+ ?ber_driver(?BER, testSeqOfCho:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqOfCho_cases(?BER)),
- ?line testSeqOfCho:compile(Config,?PER,[]),
- ?line testSeqOfCho_cases(?PER),
+ testSeqOfCho:compile(Config, ?PER, []),
+ testSeqOfCho_cases(?PER),
- ?line ?per_bit_opt(testSeqOfCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfCho_cases(?PER)),
+ ?per_bit_opt(testSeqOfCho:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSeqOfCho_cases(?PER)),
- ?line ?uper_bin(testSeqOfCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfCho_cases(uper_bin)),
+ ?uper_bin(testSeqOfCho:compile(Config, uper_bin, [])),
+ ?uper_bin(testSeqOfCho_cases(uper_bin)),
- ?line testSeqOfCho:compile(Config,?PER,[optimize]),
- ?line testSeqOfCho_cases(?PER).
+ testSeqOfCho:compile(Config, ?PER, [optimize]),
+ testSeqOfCho_cases(?PER).
testSeqOfIndefinite(suite) -> [];
testSeqOfIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ %% Mvrasn (11-21)-4
+ testSeqOfIndefinite:compile(Config, ?BER, []),
+ testSeqOfIndefinite:main(),
- ?line testSeqOfIndefinite:compile(Config,?BER,[]),
- ?line testSeqOfIndefinite:main(),
-
- ?line ?ber_driver(?BER,testSeqOfIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfIndefinite:main()).
+ ?ber_driver(?BER, testSeqOfIndefinite:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqOfIndefinite:main()).
testSeqOfCho_cases(Rules) ->
- ?line testSeqOfCho:main(Rules).
+ testSeqOfCho:main(Rules).
testSeqOfExternal(suite) -> [];
testSeqOfExternal(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqOfExternal:compile(Config,?BER,[]),
- ?line testSeqOfExternal_cases(?BER),
+ asn1_test_lib:compile("External", Config, [?BER]),
+ testSeqOfExternal:compile(Config, ?BER, []),
+ testSeqOfExternal_cases(?BER),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfExternal_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqOfExternal:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqOfExternal_cases(?BER)),
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSeqOfExternal:compile(Config,?PER,[]),
- ?line testSeqOfExternal_cases(?PER),
+ asn1_test_lib:compile("External", Config, [?PER]),
+ testSeqOfExternal:compile(Config, ?PER, []),
+ testSeqOfExternal_cases(?PER),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfExternal_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("External", Config, [?PER, optimize])),
+ ?per_bit_opt(testSeqOfExternal:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSeqOfExternal_cases(?PER)),
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfExternal_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("External", Config, [uper_bin])),
+ ?uper_bin(testSeqOfExternal:compile(Config, uper_bin, [])),
+ ?uper_bin(testSeqOfExternal_cases(uper_bin)),
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSeqOfExternal:compile(Config,?PER,[optimize]),
- ?line testSeqOfExternal_cases(?PER).
+ asn1_test_lib:compile("External", Config, [?PER, optimize]),
+ testSeqOfExternal:compile(Config, ?PER, [optimize]),
+ testSeqOfExternal_cases(?PER).
testSeqOfExternal_cases(Rules) ->
- ?line testSeqOfExternal:main(Rules).
+ testSeqOfExternal:main(Rules).
testSeqOfTag(suite) -> [];
testSeqOfTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSeqOfTag:compile(Config,?BER,[]),
- ?line testSeqOfTag_cases(?BER),
+ asn1_test_lib:compile("External", Config, [?BER]),
+ testSeqOfTag:compile(Config, ?BER, []),
+ testSeqOfTag_cases(?BER),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqOfTag_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqOfTag:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSeqOfTag_cases(?BER)),
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSeqOfTag:compile(Config,?PER,[]),
- ?line testSeqOfTag_cases(?PER),
+ asn1_test_lib:compile("External", Config, [?PER]),
+ testSeqOfTag:compile(Config, ?PER, []),
+ testSeqOfTag_cases(?PER),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSeqOfTag_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("External", Config, [?PER, optimize])),
+ ?per_bit_opt(testSeqOfTag:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSeqOfTag_cases(?PER)),
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSeqOfTag_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("External", Config, [uper_bin])),
+ ?uper_bin(testSeqOfTag:compile(Config, uper_bin, [])),
+ ?uper_bin(testSeqOfTag_cases(uper_bin)),
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSeqOfTag:compile(Config,?PER,[optimize]),
- ?line testSeqOfTag_cases(?PER).
+ asn1_test_lib:compile("External", Config, [?PER, optimize]),
+ testSeqOfTag:compile(Config, ?PER, [optimize]),
+ testSeqOfTag_cases(?PER).
testSeqOfTag_cases(Rules) ->
- ?line testSeqOfTag:main(Rules).
+ testSeqOfTag:main(Rules).
testSetDefault(suite) -> [];
testSetDefault(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("SetDefault", Config, [?BER]),
+ testSetDefault_cases(?BER),
- ?line testSetDefault:compile(Config,?BER,[]),
- ?line testSetDefault_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetDefault", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetDefault_cases(?BER)),
- ?line ?ber_driver(?BER,testSetDefault:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetDefault_cases(?BER)),
+ asn1_test_lib:compile("SetDefault", Config, [?PER]),
+ testSetDefault_cases(?PER),
- ?line testSetDefault:compile(Config,?PER,[]),
- ?line testSetDefault_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("SetDefault", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetDefault_cases(?PER)),
- ?line ?per_bit_opt(testSetDefault:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetDefault_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("SetDefault", Config, [uper_bin])),
+ ?uper_bin(testSetDefault_cases(uper_bin)),
- ?line ?uper_bin(testSetDefault:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetDefault_cases(uper_bin)),
-
- ?line testSetDefault:compile(Config,?PER,[optimize]),
- ?line testSetDefault_cases(?PER).
+ asn1_test_lib:compile("SetDefault", Config, [?PER, optimize]),
+ testSetDefault_cases(?PER).
testSetDefault_cases(Rules) ->
- ?line testSetDefault:main(Rules).
+ testSetDefault:main(Rules).
testParamBasic(suite) -> [];
testParamBasic(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testParamBasic:compile(Config,?BER,[]),
- ?line testParamBasic_cases(?BER),
+ testParamBasic:compile(Config, ?BER, []),
+ testParamBasic_cases(?BER),
- ?line ?ber_driver(?BER,testParamBasic:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testParamBasic_cases(?BER)),
+ ?ber_driver(?BER, testParamBasic:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testParamBasic_cases(?BER)),
- ?line testParamBasic:compile(Config,?PER,[]),
- ?line testParamBasic_cases(?PER),
+ testParamBasic:compile(Config, ?PER, []),
+ testParamBasic_cases(?PER),
- ?line ?per_bit_opt(testParamBasic:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testParamBasic_cases(?PER)),
+ ?per_bit_opt(testParamBasic:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testParamBasic_cases(?PER)),
- ?line ?uper_bin(testParamBasic:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testParamBasic_cases(uper_bin)),
+ ?uper_bin(testParamBasic:compile(Config, uper_bin, [])),
+ ?uper_bin(testParamBasic_cases(uper_bin)),
- ?line testParamBasic:compile(Config,?PER,[optimize]),
- ?line testParamBasic_cases(?PER).
+ testParamBasic:compile(Config, ?PER, [optimize]),
+ testParamBasic_cases(?PER).
testParamBasic_cases(Rules) ->
- ?line testParamBasic:main(Rules).
+ testParamBasic:main(Rules).
testSetExtension(suite) -> [];
testSetExtension(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("External", Config, [?BER]),
+ asn1_test_lib:compile("SetExtension", Config, [?BER]),
+ testSetExtension_cases(?BER),
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetExtension:compile(Config,?BER,[]),
- ?line testSetExtension_cases(?BER),
-
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExtension:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExtension_cases(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetExtension", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetExtension_cases(?BER)).
testSetExtension_cases(Rules) ->
- ?line testSetExtension:main(Rules).
+ testSetExtension:main(Rules).
testSetExternal(suite) -> [];
testSetExternal(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetExternal:compile(Config,?BER,[]),
- ?line testSetExternal_cases(?BER),
+ asn1_test_lib:compile("External", Config, [?BER]),
+ testSetExternal:compile(Config, ?BER, []),
+ testSetExternal_cases(?BER),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetExternal_cases(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetExternal:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSetExternal_cases(?BER)).
testSetExternal_cases(Rules) ->
- ?line testSetExternal:main(Rules).
+ testSetExternal:main(Rules).
testSetOptional(suite) -> [];
testSetOptional(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ testSetOptional:compile(Config, ?BER, []),
+ testSetOptional_cases(?BER),
- ?line testSetOptional:compile(Config,?BER,[]),
- ?line testSetOptional_cases(?BER),
+ ?ber_driver(?BER, testSetOptional:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSetOptional_cases(?BER)),
- ?line ?ber_driver(?BER,testSetOptional:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOptional_cases(?BER)),
+ testSetOptional:compile(Config, ?PER, []),
+ testSetOptional_cases(?PER),
- ?line testSetOptional:compile(Config,?PER,[]),
- ?line testSetOptional_cases(?PER),
+ ?per_bit_opt(testSetOptional:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSetOptional_cases(?PER)),
- ?line ?per_bit_opt(testSetOptional:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOptional_cases(?PER)),
+ ?uper_bin(testSetOptional:compile(Config, uper_bin, [])),
+ ?uper_bin(testSetOptional_cases(uper_bin)),
- ?line ?uper_bin(testSetOptional:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOptional_cases(uper_bin)),
-
- ?line testSetOptional:compile(Config,?PER,[optimize]),
- ?line testSetOptional_cases(?PER).
+ testSetOptional:compile(Config, ?PER, [optimize]),
+ testSetOptional_cases(?PER).
testSetOptional_cases(Rules) ->
- ?line ok = testSetOptional:ticket_7533(Rules),
- ?line ok = testSetOptional:main(Rules).
+ ok = testSetOptional:ticket_7533(Rules),
+ ok = testSetOptional:main(Rules).
testSetPrim(suite) -> [];
testSetPrim(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetPrim:compile(Config,?BER,[]),
- ?line testSetPrim_cases(?BER),
+ testSetPrim:compile(Config, ?BER, []),
+ testSetPrim_cases(?BER),
- ?line ?ber_driver(?BER,testSetPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetPrim_cases(?BER)),
+ ?ber_driver(?BER, testSetPrim:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSetPrim_cases(?BER)),
- ?line testSetPrim:compile(Config,?PER,[]),
- ?line testSetPrim_cases(?PER),
+ testSetPrim:compile(Config, ?PER, []),
+ testSetPrim_cases(?PER),
- ?line ?per_bit_opt(testSetPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetPrim_cases(?PER)),
+ ?per_bit_opt(testSetPrim:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSetPrim_cases(?PER)),
- ?line ?uper_bin(testSetPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetPrim_cases(uper_bin)),
+ ?uper_bin(testSetPrim:compile(Config, uper_bin, [])),
+ ?uper_bin(testSetPrim_cases(uper_bin)),
- ?line testSetPrim:compile(Config,?PER,[optimize]),
- ?line testSetPrim_cases(?PER).
+ testSetPrim:compile(Config, ?PER, [optimize]),
+ testSetPrim_cases(?PER).
testSetPrim_cases(Rules) ->
- ?line testSetPrim:main(Rules).
+ testSetPrim:main(Rules).
testSetTag(suite) -> [];
testSetTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetTag:compile(Config,?BER,[]),
- ?line testSetTag_cases(?BER),
+ asn1_test_lib:compile("External", Config, [?BER]),
+ testSetTag:compile(Config, ?BER, []),
+ testSetTag_cases(?BER),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTag_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetTag:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testSetTag_cases(?BER)),
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSetTag:compile(Config,?PER,[]),
- ?line testSetTag_cases(?PER),
+ asn1_test_lib:compile("External", Config, [?PER]),
+ testSetTag:compile(Config, ?PER, []),
+ testSetTag_cases(?PER),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTag_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("External", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetTag:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(testSetTag_cases(?PER)),
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTag_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("External", Config, [uper_bin])),
+ ?uper_bin(testSetTag:compile(Config, uper_bin, [])),
+ ?uper_bin(testSetTag_cases(uper_bin)),
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSetTag:compile(Config,?PER,[optimize]),
- ?line testSetTag_cases(?PER).
+ asn1_test_lib:compile("External", Config, [?PER, optimize]),
+ testSetTag:compile(Config, ?PER, [optimize]),
+ testSetTag_cases(?PER).
testSetTag_cases(Rules) ->
- ?line testSetTag:main(Rules).
+ testSetTag:main(Rules).
testSetTypeRefCho(suite) -> [];
testSetTypeRefCho(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("SetTypeRefCho", Config, [?BER]),
+ testSetTypeRefCho_cases(?BER),
- ?line testSetTypeRefCho:compile(Config,?BER,[]),
- ?line testSetTypeRefCho_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetTypeRefCho", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetTypeRefCho_cases(?BER)),
- ?line ?ber_driver(?BER,testSetTypeRefCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefCho_cases(?BER)),
+ asn1_test_lib:compile("SetTypeRefCho", Config, [?PER]),
+ testSetTypeRefCho_cases(?PER),
- ?line testSetTypeRefCho:compile(Config,?PER,[]),
- ?line testSetTypeRefCho_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("SetTypeRefCho", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetTypeRefCho_cases(?PER)),
- ?line ?per_bit_opt(testSetTypeRefCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefCho_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("SetTypeRefCho", Config, [uper_bin])),
+ ?uper_bin(testSetTypeRefCho_cases(uper_bin)),
- ?line ?uper_bin(testSetTypeRefCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefCho_cases(uper_bin)),
-
- ?line testSetTypeRefCho:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefCho_cases(?PER).
+ asn1_test_lib:compile("SetTypeRefCho", Config, [?PER, optimize]),
+ testSetTypeRefCho_cases(?PER).
testSetTypeRefCho_cases(Rules) ->
- ?line testSetTypeRefCho:main(Rules).
+ testSetTypeRefCho:main(Rules).
testSetTypeRefPrim(suite) -> [];
testSetTypeRefPrim(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetTypeRefPrim:compile(Config,?BER,[]),
- ?line testSetTypeRefPrim_cases(?BER),
+ asn1_test_lib:compile("SetTypeRefPrim", Config, [?BER]),
+ testSetTypeRefPrim_cases(?BER),
- ?line ?ber_driver(?BER,testSetTypeRefPrim:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefPrim_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetTypeRefPrim", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetTypeRefPrim_cases(?BER)),
- ?line testSetTypeRefPrim:compile(Config,?PER,[]),
- ?line testSetTypeRefPrim_cases(?PER),
+ asn1_test_lib:compile("SetTypeRefPrim", Config, [?PER]),
+ testSetTypeRefPrim_cases(?PER),
- ?line ?per_bit_opt(testSetTypeRefPrim:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefPrim_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("SetTypeRefPrim", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetTypeRefPrim_cases(?PER)),
- ?line ?uper_bin(testSetTypeRefPrim:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefPrim_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("SetTypeRefPrim", Config, [uper_bin])),
+ ?uper_bin(testSetTypeRefPrim_cases(uper_bin)),
- ?line testSetTypeRefPrim:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefPrim_cases(?PER).
+ asn1_test_lib:compile("SetTypeRefPrim", Config, [?PER, optimize]),
+ testSetTypeRefPrim_cases(?PER).
testSetTypeRefPrim_cases(Rules) ->
- ?line testSetTypeRefPrim:main(Rules).
+ testSetTypeRefPrim:main(Rules).
testSetTypeRefSeq(suite) -> [];
testSetTypeRefSeq(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("SetTypeRefSeq", Config, [?BER]),
+ testSetTypeRefSeq_cases(?BER),
- ?line testSetTypeRefSeq:compile(Config,?BER,[]),
- ?line testSetTypeRefSeq_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetTypeRefSeq", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetTypeRefSeq_cases(?BER)),
- ?line ?ber_driver(?BER,testSetTypeRefSeq:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefSeq_cases(?BER)),
+ asn1_test_lib:compile("SetTypeRefSeq", Config, [?PER]),
+ testSetTypeRefSeq_cases(?PER),
- ?line testSetTypeRefSeq:compile(Config,?PER,[]),
- ?line testSetTypeRefSeq_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("SetTypeRefSeq", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetTypeRefSeq_cases(?PER)),
- ?line ?per_bit_opt(testSetTypeRefSeq:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefSeq_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("SetTypeRefSeq", Config, [uper_bin])),
+ ?uper_bin(testSetTypeRefSeq_cases(uper_bin)),
- ?line ?uper_bin(testSetTypeRefSeq:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefSeq_cases(uper_bin)),
-
- ?line testSetTypeRefSeq:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefSeq_cases(?PER).
+ asn1_test_lib:compile("SetTypeRefSeq", Config, [?PER, optimize]),
+ testSetTypeRefSeq_cases(?PER).
testSetTypeRefSeq_cases(Rules) ->
- ?line testSetTypeRefSeq:main(Rules).
+ testSetTypeRefSeq:main(Rules).
testSetTypeRefSet(suite) -> [];
testSetTypeRefSet(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetTypeRefSet:compile(Config,?BER,[]),
- ?line testSetTypeRefSet_cases(?BER),
+ asn1_test_lib:compile("SetTypeRefSet", Config, [?BER]),
+ testSetTypeRefSet_cases(?BER),
- ?line ?ber_driver(?BER,testSetTypeRefSet:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetTypeRefSet_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetTypeRefSet", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetTypeRefSet_cases(?BER)),
- ?line testSetTypeRefSet:compile(Config,?PER,[]),
- ?line testSetTypeRefSet_cases(?PER),
+ asn1_test_lib:compile("SetTypeRefSet", Config, [?PER]),
+ testSetTypeRefSet_cases(?PER),
- ?line ?per_bit_opt(testSetTypeRefSet:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetTypeRefSet_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("SetTypeRefSet", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetTypeRefSet_cases(?PER)),
- ?line ?uper_bin(testSetTypeRefSet:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetTypeRefSet_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("SetTypeRefSet", Config, [uper_bin])),
+ ?uper_bin(testSetTypeRefSet_cases(uper_bin)),
- ?line testSetTypeRefSet:compile(Config,?PER,[optimize]),
- ?line testSetTypeRefSet_cases(?PER).
+ asn1_test_lib:compile("SetTypeRefSet", Config, [?PER, optimize]),
+ testSetTypeRefSet_cases(?PER).
testSetTypeRefSet_cases(Rules) ->
- ?line testSetTypeRefSet:main(Rules).
+ testSetTypeRefSet:main(Rules).
testSetOf(suite) -> [];
testSetOf(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("SetOf", Config, [?BER]),
+ testSetOf_cases(?BER),
- ?line testSetOf:compile(Config,?BER,[]),
- ?line testSetOf_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetOf", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetOf_cases(?BER)),
- ?line ?ber_driver(?BER,testSetOf:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOf_cases(?BER)),
+ asn1_test_lib:compile("SetOf", Config, [?PER]),
+ testSetOf_cases(?PER),
- ?line testSetOf:compile(Config,?PER,[]),
- ?line testSetOf_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("SetOf", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetOf_cases(?PER)),
- ?line ?per_bit_opt(testSetOf:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOf_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("SetOf", Config, [uper_bin])),
+ ?uper_bin(testSetOf_cases(uper_bin)),
- ?line ?uper_bin(testSetOf:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOf_cases(uper_bin)),
-
- ?line testSetOf:compile(Config,?PER,[optimize]),
- ?line testSetOf_cases(?PER).
+ asn1_test_lib:compile("SetOf", Config, [?PER, optimize]),
+ testSetOf_cases(?PER).
testSetOf_cases(Rules) ->
- ?line testSetOf:main(Rules).
+ testSetOf:main(Rules).
testSetOfCho(suite) -> [];
testSetOfCho(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetOfCho:compile(Config,?BER,[]),
- ?line testSetOfCho_cases(?BER),
+ asn1_test_lib:compile("SetOfCho", Config, [?BER]),
+ testSetOfCho_cases(?BER),
- ?line ?ber_driver(?BER,testSetOfCho:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfCho_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetOfCho", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetOfCho_cases(?BER)),
- ?line testSetOfCho:compile(Config,?PER,[]),
- ?line testSetOfCho_cases(?PER),
+ asn1_test_lib:compile("SetOfCho", Config, [?PER]),
+ testSetOfCho_cases(?PER),
- ?line ?per_bit_opt(testSetOfCho:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfCho_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("SetOfCho", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetOfCho_cases(?PER)),
- ?line ?uper_bin(testSetOfCho:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfCho_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("SetOfCho", Config, [uper_bin])),
+ ?uper_bin(testSetOfCho_cases(uper_bin)),
- ?line testSetOfCho:compile(Config,?PER,[optimize]),
- ?line testSetOfCho_cases(?PER).
+ asn1_test_lib:compile("SetOfCho", Config, [?PER, optimize]),
+ testSetOfCho_cases(?PER).
testSetOfCho_cases(Rules) ->
- ?line testSetOfCho:main(Rules).
+ testSetOfCho:main(Rules).
testSetOfExternal(suite) -> [];
testSetOfExternal(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetOfExternal:compile(Config,?BER,[]),
- ?line testSetOfExternal_cases(?BER),
+ asn1_test_lib:compile("External", Config, [?BER]),
+ asn1_test_lib:compile("SetOfExternal", Config, [?BER]),
+ testSetOfExternal_cases(?BER),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfExternal_cases(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetOfExternal", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetOfExternal_cases(?BER)),
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSetOfExternal:compile(Config,?PER,[]),
- ?line testSetOfExternal_cases(?PER),
+ asn1_test_lib:compile("External", Config, [?PER]),
+ asn1_test_lib:compile("SetOfExternal", Config, [?PER]),
+ testSetOfExternal_cases(?PER),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfExternal_cases(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("External", Config, [?PER, optimize])),
+ ?per_bit_opt(asn1_test_lib:compile("SetOfExternal", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetOfExternal_cases(?PER)),
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfExternal_cases(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("External", Config, [uper_bin])),
+ ?uper_bin(asn1_test_lib:compile("SetOfExternal", Config, [uper_bin])),
+ ?uper_bin(testSetOfExternal_cases(uper_bin)),
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSetOfExternal:compile(Config,?PER,[optimize]),
- ?line testSetOfExternal_cases(?PER).
+ asn1_test_lib:compile("External", Config, [?PER, optimize]),
+ asn1_test_lib:compile("SetOfExternal", Config, [?PER, optimize]),
+ testSetOfExternal_cases(?PER).
testSetOfExternal_cases(Rules) ->
- ?line testSetOfExternal:main(Rules).
+ testSetOfExternal:main(Rules).
testSetOfTag(suite) -> [];
testSetOfTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("External", Config, [?BER]),
+ asn1_test_lib:compile("SetOfTag", Config, [?BER]),
+ testSetOfTag_cases(?BER),
- ?line testExternal:compile(Config,?BER,[]),
- ?line testSetOfTag:compile(Config,?BER,[]),
- ?line testSetOfTag_cases(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("External", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("SetOfTag", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetOfTag_cases(?BER)),
- ?line ?ber_driver(?BER,testExternal:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetOfTag_cases(?BER)),
+ asn1_test_lib:compile("External", Config, [?PER]),
+ asn1_test_lib:compile("SetOfTag", Config, [?PER]),
+ testSetOfTag_cases(?PER),
- ?line testExternal:compile(Config,?PER,[]),
- ?line testSetOfTag:compile(Config,?PER,[]),
- ?line testSetOfTag_cases(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("External", Config, [?PER, optimize])),
+ ?per_bit_opt(asn1_test_lib:compile("SetOfTag", Config, [?PER, optimize])),
+ ?per_bit_opt(testSetOfTag_cases(?PER)),
- ?line ?per_bit_opt(testExternal:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testSetOfTag_cases(?PER)),
+ ?uper_bin(asn1_test_lib:compile("External", Config, [uper_bin])),
+ ?uper_bin(asn1_test_lib:compile("SetOfTag", Config, [uper_bin])),
+ ?uper_bin(testSetOfTag_cases(uper_bin)),
- ?line ?uper_bin(testExternal:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testSetOfTag_cases(uper_bin)),
-
- ?line testExternal:compile(Config,?PER,[optimize]),
- ?line testSetOfTag:compile(Config,?PER,[optimize]),
- ?line testSetOfTag_cases(?PER).
+ asn1_test_lib:compile("External", Config, [?PER, optimize]),
+ asn1_test_lib:compile("SetOfTag", Config, [?PER, optimize]),
+ testSetOfTag_cases(?PER).
testSetOfTag_cases(Rules) ->
- ?line testSetOfTag:main(Rules).
+ testSetOfTag:main(Rules).
-sequence(suite) -> [{sequence,all}].
+sequence(suite) -> [{sequence, all}].
c_syntax(suite) -> [];
c_syntax(Config) ->
- ?line DataDir% ?line testExternal:compile(Config,?PER),
-% ?line testPrimExternal:compile(Config,?PER),
-% ?line testPrimExternal_cases(?PER).
- = ?config(data_dir,Config),
- ?line _TempDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line {error,_R1} = asn1ct:compile(filename:join(DataDir,"Syntax")),
- ?line {error,_R2} = asn1ct:compile(filename:join(DataDir,"BadTypeEnding")),
- ?line {error,_R3} = asn1ct:compile(filename:join(DataDir,
- "BadValueAssignment1")),
- ?line {error,_R4} = asn1ct:compile(filename:join(DataDir,
+ DataDir% asn1_test_lib:compile("External", Config, ?PER),
+% testPrimExternal:compile(Config, ?PER),
+% testPrimExternal_cases(?PER).
+ = ?config(data_dir, Config),
+ _TempDir = ?config(priv_dir, Config),
+ {error, _R1} = asn1ct:compile(filename:join(DataDir, "Syntax")),
+ {error, _R2} = asn1ct:compile(filename:join(DataDir, "BadTypeEnding")),
+ {error, _R3} = asn1ct:compile(filename:join(DataDir,
+ "BadValueAssignment1")),
+ {error, _R4} = asn1ct:compile(filename:join(DataDir,
"BadValueAssignment2")),
- ?line {error,_R5} = asn1ct:compile(filename:join(DataDir,
- "BadValueSet")),
- ?line {error,_R6} = asn1ct:compile(filename:join(DataDir,
- "ChoiceBadExtension")),
- ?line {error,_R7} = asn1ct:compile(filename:join(DataDir,
- "EnumerationBadExtension")),
- ?line {error,_R8} = asn1ct:compile(filename:join(DataDir,
- "Example")),
- ?line {error,_R9} = asn1ct:compile(filename:join(DataDir,
- "Export1")),
- ?line {error,_R10} = asn1ct:compile(filename:join(DataDir,
- "MissingEnd")),
- ?line {error,_R11} = asn1ct:compile(filename:join(DataDir,
- "SequenceBadComma")),
- ?line {error,_R12} = asn1ct:compile(filename:join(DataDir,
- "SequenceBadComponentName")),
- ?line {error,_R13} = asn1ct:compile(filename:join(DataDir,
- "SequenceBadComponentType")),
- ?line {error,_R14} = asn1ct:compile(filename:join(DataDir,
- "SeqBadComma")).
+ {error, _R5} = asn1ct:compile(filename:join(DataDir,
+ "BadValueSet")),
+ {error, _R6} = asn1ct:compile(filename:join(DataDir,
+ "ChoiceBadExtension")),
+ {error, _R7} = asn1ct:compile(filename:join(DataDir,
+ "EnumerationBadExtension")),
+ {error, _R8} = asn1ct:compile(filename:join(DataDir,
+ "Example")),
+ {error, _R9} = asn1ct:compile(filename:join(DataDir,
+ "Export1")),
+ {error, _R10} = asn1ct:compile(filename:join(DataDir,
+ "MissingEnd")),
+ {error, _R11} = asn1ct:compile(filename:join(DataDir,
+ "SequenceBadComma")),
+ {error, _R12} = asn1ct:compile(filename:join(DataDir,
+ "SequenceBadComponentName")),
+ {error, _R13} = asn1ct:compile(filename:join(DataDir,
+ "SequenceBadComponentType")),
+ {error, _R14} = asn1ct:compile(filename:join(DataDir,
+ "SeqBadComma")).
c_string_per(suite) -> [];
c_string_per(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line TempDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"String"),[?PER,{outdir,TempDir}]).
+ asn1_test_lib:compile("String", Config, [?PER]).
c_string_ber(suite) -> [];
c_string_ber(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line TempDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"String"),[?BER,{outdir,TempDir}]).
+ asn1_test_lib:compile("String", Config, [?BER]).
c_implicit_before_choice(suite) -> [];
c_implicit_before_choice(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line TempDir = ?config(priv_dir,Config),
- ?line {error,_R2} = asn1ct:compile(filename:join(DataDir,"CCSNARG3"),[?BER,{outdir,TempDir}]).
+ DataDir = ?config(data_dir, Config),
+ TempDir = ?config(priv_dir, Config),
+ {error, _R2} = asn1ct:compile(filename:join(DataDir, "CCSNARG3"),
+ [?BER, {outdir, TempDir}]).
parse(suite) -> [];
parse(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
M1 = test_modules(),
-% M2 = parse_modules(),
- ?line ok = parse1(M1,DataDir,OutDir).
+ ok = parse1(M1, Config).
-parse1([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[abs,{outdir,OutDir}]),
- parse1(T,DataDir,OutDir);
-parse1([],_,_) ->
+parse1([M|T], Config) ->
+ asn1_test_lib:compile(M, Config, [abs]),
+ parse1(T, Config);
+parse1([], _) ->
ok.
per(suite) -> [];
per(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = per1(per_modules(),DataDir,OutDir),
- ?line ?per_bit_opt(per1_bit_opt(per_modules(),DataDir,OutDir)),
- ?line ok = per1_opt(per_modules(),DataDir,OutDir).
-
-
-per1([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?PER,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M), [{i, OutDir}]),
- per1(T,DataDir,OutDir);
-per1([],_,_) ->
- ok.
+ CaseDir = ?config(case_dir, Config),
+ ok = per1(per_modules(), Config, CaseDir),
+ ?per_bit_opt(per1_bit_opt(per_modules(), Config, CaseDir)).
-per1_bit_opt([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?PER,optimize,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M), [{i, OutDir}]),
- per1_bit_opt(T,DataDir,OutDir);
-per1_bit_opt([],_,_) ->
+
+per1([M|T], Config, CaseDir) ->
+ asn1_test_lib:compile(M, Config, [?PER]),
+ ok = asn1ct:test(list_to_atom(M), [{i, CaseDir}]),
+ per1(T, Config, CaseDir);
+per1([], _, _) ->
ok.
-per1_opt([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?PER,optimized,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M), [{i, OutDir}]),
- per1_opt(T,DataDir,OutDir);
-per1_opt([],_,_) ->
+per1_bit_opt([M|T], Config, CaseDir) ->
+ asn1_test_lib:compile(M, Config, [?PER, optimize]),
+ ok = asn1ct:test(list_to_atom(M), [{i, CaseDir}]),
+ per1_bit_opt(T, Config, CaseDir);
+per1_bit_opt([], _, _) ->
ok.
ber_choiceinseq(suite) ->[];
ber_choiceinseq(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"ChoiceInSeq"),[?BER,{outdir,OutDir}]).
+ asn1_test_lib:compile("ChoiceInSeq", Config, [?BER]).
ber_optional(suite) ->[];
ber_optional(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"SOpttest"),[?BER,{outdir,OutDir}]),
- ?line V = {'S',{'A',10,asn1_NOVALUE,asn1_NOVALUE},
- {'B',asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
- {'C',asn1_NOVALUE,111,asn1_NOVALUE}},
- ?line {ok,B} = asn1_wrapper:encode('SOpttest','S',V),
- ?line Bytes = lists:flatten(B),
- ?line V2 = asn1_wrapper:decode('SOpttest','S',Bytes),
- ?line ok = eq(V,element(2,V2)).
+ asn1_test_lib:compile("SOpttest", Config, [?BER]),
+
+ V = {'S', {'A', 10, asn1_NOVALUE, asn1_NOVALUE},
+ {'B', asn1_NOVALUE, asn1_NOVALUE, asn1_NOVALUE},
+ {'C', asn1_NOVALUE, 111, asn1_NOVALUE}},
+ {ok, B} = asn1_wrapper:encode('SOpttest', 'S', V),
+ Bytes = lists:flatten(B),
+ V2 = asn1_wrapper:decode('SOpttest', 'S', Bytes),
+ V = element(2, V2).
ber_optional_keyed_list(suite) ->[];
ber_optional_keyed_list(Config) ->
case ?BER of
- ber_bin_v2 -> ok;
- _ ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(filename:join(DataDir,"SOpttest"),
- [?BER,keyed_list,{outdir,OutDir}]),
- ?line Vrecord = {'S',{'A',10,asn1_NOVALUE,asn1_NOVALUE},
- {'B',asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
- {'C',asn1_NOVALUE,111,asn1_NOVALUE}},
- ?line V = [ {a,[{scriptKey,10}]},
- {b,[]},
- {c,[{callingPartysCategory,111}]} ],
- ?line {ok,B} = asn1_wrapper:encode('SOpttest','S',V),
- ?line Bytes = lists:flatten(B),
- ?line V2 = asn1_wrapper:decode('SOpttest','S',Bytes),
- ?line ok = eq(Vrecord,element(2,V2))
+ ber_bin_v2 ->
+ ok;
+ _ ->
+ asn1_test_lib:compile("SOpttest", Config, [?BER, keyed_list]),
+ Vrecord = {'S', {'A', 10, asn1_NOVALUE, asn1_NOVALUE},
+ {'B', asn1_NOVALUE, asn1_NOVALUE, asn1_NOVALUE},
+ {'C', asn1_NOVALUE, 111, asn1_NOVALUE}},
+ V = [{a, [{scriptKey, 10}]},
+ {b, []},
+ {c, [{callingPartysCategory, 111}]}],
+ {ok, B} = asn1_wrapper:encode('SOpttest', 'S', V),
+ Bytes = lists:flatten(B),
+ V2 = asn1_wrapper:decode('SOpttest', 'S', Bytes),
+ Vrecord = element(2, V2)
end.
-
-eq(V,V) ->
- ok.
-
-
ber_other(suite) ->[];
ber_other(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = ber1(ber_modules(),DataDir,OutDir).
+ CaseDir = ?config(case_dir, Config),
+ ok = ber1(ber_modules(), Config, CaseDir).
-ber1([M|T],DataDir,OutDir) ->
- ?line ok = asn1ct:compile(DataDir ++ M,[?BER,{outdir,OutDir}]),
- ?line ok = asn1ct:test(list_to_atom(M), [{i, OutDir}]),
- ber1(T,DataDir,OutDir);
-ber1([],_,_) ->
+ber1([M|T], Config, CaseDir) ->
+ asn1_test_lib:compile(M, Config, [?BER]),
+ ok = asn1ct:test(list_to_atom(M), [{i, CaseDir}]),
+ ber1(T, Config, CaseDir);
+ber1([], _, _) ->
ok.
default_per(suite) ->[];
default_per(Config) ->
- default1(?PER,Config,[]).
+ default1(Config, [?PER]).
default_per_opt(suite) -> [];
default_per_opt(Config) ->
- ?per_bit_opt(default1(?PER,Config,[optimize])),
- default1(?PER,Config,[optimize]).
+ ?per_bit_opt(default1(Config, [?PER, optimize])),
+ default1(Config, [?PER, optimize]).
default_ber(suite) ->[];
default_ber(Config) ->
- default1(?BER,Config,[]).
-
-default1(Rule,Config,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Def",[Rule,{outdir,OutDir}]++Options),
- ?line {ok,Bytes1} = asn1_wrapper:encode('Def','Def1',#'Def1'{bool0 = true,
- bool1 = true,
- bool2 = true,
- bool3 = true}),
- ?line {ok,{'Def1',true,true,true,true}} = asn1_wrapper:decode('Def','Def1',lists:flatten(Bytes1)),
-
- ?line {ok,Bytes2} = asn1_wrapper:encode('Def','Def1',#'Def1'{bool0 = true}),
- ?line {ok,{'Def1',true,false,false,false}} = asn1_wrapper:decode('Def','Def1',lists:flatten(Bytes2)),
-
- ?line {ok,Bytes3} = asn1_wrapper:encode('Def','Def1',#'Def1'{bool0 = true,bool2=false}),
- ?line {ok,{'Def1',true,false,false,false}} = asn1_wrapper:decode('Def','Def1',lists:flatten(Bytes3)).
-
-
+ default1(Config, [?BER]).
+
+default1(Config, Options) ->
+ asn1_test_lib:compile("Def", Config, Options),
+
+ {ok, Bytes1} = asn1_wrapper:encode('Def', 'Def1', #'Def1'{bool0 = true,
+ bool1 = true,
+ bool2 = true,
+ bool3 = true}),
+ {ok, {'Def1', true, true, true, true}} =
+ asn1_wrapper:decode('Def', 'Def1', lists:flatten(Bytes1)),
+
+ {ok, Bytes2} = asn1_wrapper:encode('Def', 'Def1', #'Def1'{bool0 = true}),
+ {ok, {'Def1', true, false, false, false}} =
+ asn1_wrapper:decode('Def', 'Def1', lists:flatten(Bytes2)),
+
+ {ok, Bytes3} = asn1_wrapper:encode('Def', 'Def1', #'Def1'{bool0 = true,
+ bool2 = false}),
+ {ok, {'Def1', true, false, false, false}} =
+ asn1_wrapper:decode('Def', 'Def1', lists:flatten(Bytes3)).
+
+
value_test(suite) ->[];
value_test(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ObjIdValues",[?BER,{outdir,OutDir}]),
- ?line {ok,_} = asn1_wrapper:encode('ObjIdValues','ObjIdType','ObjIdValues':'mobileDomainId'()),
- ?line ok = asn1ct:compile(DataDir ++ "ObjIdValues",[?PER,{outdir,OutDir}]),
- ?line {ok,_} = asn1_wrapper:encode('ObjIdValues','ObjIdType','ObjIdValues':'mobileDomainId'()),
- ?line ok = test_bad_values:tests(Config),
+ asn1_test_lib:compile("ObjIdValues", Config, [?BER]),
+ {ok, _} = asn1_wrapper:encode('ObjIdValues', 'ObjIdType', 'ObjIdValues':'mobileDomainId'()),
+ asn1_test_lib:compile("ObjIdValues", Config, [?PER]),
+ {ok, _} = asn1_wrapper:encode('ObjIdValues', 'ObjIdType', 'ObjIdValues':'mobileDomainId'()),
+ ok = test_bad_values:tests(Config),
ok.
constructed(suite) ->
[];
constructed(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Constructed",[?BER,{outdir,OutDir}]),
- ?line {ok,B} = asn1_wrapper:encode('Constructed','S',{'S',false}),
- ?line [40,3,1,1,0] = lists:flatten(B),
- ?line {ok,B1} = asn1_wrapper:encode('Constructed','S2',{'S2',false}),
- ?line [40,5,48,3,1,1,0] = lists:flatten(B1),
- ?line {ok,B2} = asn1_wrapper:encode('Constructed','I',10),
- ?line [136,1,10] = lists:flatten(B2),
+ asn1_test_lib:compile("Constructed", Config, [?BER]),
+ {ok, B} = asn1_wrapper:encode('Constructed', 'S', {'S', false}),
+ [40, 3, 1, 1, 0] = lists:flatten(B),
+ {ok, B1} = asn1_wrapper:encode('Constructed', 'S2', {'S2', false}),
+ [40, 5, 48, 3, 1, 1, 0] = lists:flatten(B1),
+ {ok, B2} = asn1_wrapper:encode('Constructed', 'I', 10),
+ [136, 1, 10] = lists:flatten(B2),
ok.
-
+
ber_decode_error(suite) -> [];
ber_decode_error(Config) ->
- ?line ok = ber_decode_error:compile(Config,?BER,[]),
- ?line ok = ber_decode_error:run([]),
+ asn1_test_lib:compile("Constructed", Config, [?BER]),
+ ok = ber_decode_error:run([]),
- ?line ok = ?ber_driver(?BER,ber_decode_error:compile(Config,?BER,[driver])),
- ?line ok = ?ber_driver(?BER,ber_decode_error:run([driver])),
- ok.
+ ?ber_driver(?BER, asn1_test_lib:compile("Constructed", Config, [?BER, driver])),
+ ok = ?ber_driver(?BER, ber_decode_error:run([driver])),
+ ok.
-h323test(suite) ->
+h323test(suite) ->
[];
h323test(Config) ->
- ?line ok = h323test:compile(Config,?PER,[]),
- ?line ok = h323test:run(?PER),
- ?line ?per_bit_opt(h323test:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(h323test:run(?PER)),
- ?line ?uper_bin(h323test:compile(Config,uper_bin,[])),
- ?line ?uper_bin(h323test:run(uper_bin)),
- ?line ok = h323test:compile(Config,?PER,[optimize]),
- ?line ok = h323test:run(?PER),
+ Files = ["H235-SECURITY-MESSAGES",
+ "H323-MESSAGES",
+ "MULTIMEDIA-SYSTEM-CONTROL"],
+ asn1_test_lib:compile_all(Files, Config, [?PER]),
+ ok = h323test:run(?PER),
+ ?per_bit_opt(asn1_test_lib:compile_all(Files, Config, [?PER, optimize])),
+ ?per_bit_opt(h323test:run(?PER)),
+ ?uper_bin(asn1_test_lib:compile_all(Files, Config, [uper_bin])),
+ ?uper_bin(h323test:run(uper_bin)),
+ ok = asn1_test_lib:compile_all(Files, Config, [?PER, optimize]),
+ ok = h323test:run(?PER),
ok.
per_GeneralString(suite) ->
[];
per_GeneralString(Config) ->
- case erlang:module_loaded('MULTIMEDIA-SYSTEM-CONTROL') of
- true ->
- ok;
- false ->
- h323test:compile(Config,?PER,[])
- end,
- UI = [109,64,1,57],
- ?line {ok,_V} = asn1_wrapper:decode('MULTIMEDIA-SYSTEM-CONTROL',
- 'MultimediaSystemControlMessage',UI).
+ asn1_test_lib:compile("MULTIMEDIA-SYSTEM-CONTROL", Config, [?PER]),
+ UI = [109, 64, 1, 57],
+ {ok, _V} = asn1_wrapper:decode('MULTIMEDIA-SYSTEM-CONTROL',
+ 'MultimediaSystemControlMessage', UI).
per_open_type(suite) ->
[];
per_open_type(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line ok = asn1ct:compile(DataDir ++ "OpenType",[?PER,{outdir,OutDir}]),
- Stype = {'Stype',10,true},
- ?line {ok,Bytes} = asn1_wrapper:encode('OpenType','Ot',Stype),
- ?line {ok,Stype} = asn1_wrapper:decode('OpenType','Ot',Bytes),
-
- ?line ?per_bit_opt(ok = asn1ct:compile(DataDir ++ "OpenType",
- [?PER,optimize,{outdir,OutDir}])),
- ?line ?per_bit_opt({ok,Bytes}=asn1_wrapper:encode('OpenType','Ot',Stype)),
- ?line ?per_bit_opt({ok,Stype}=asn1_wrapper:decode('OpenType','Ot',Bytes)),
-
- ?line ?uper_bin(ok = asn1ct:compile(DataDir ++ "OpenType",
- [uper_bin,{outdir,OutDir}])),
- ?line ?uper_bin({ok,Bytes}=asn1_wrapper:encode('OpenType','Ot',Stype)),
- ?line ?uper_bin({ok,Stype}=asn1_wrapper:decode('OpenType','Ot',Bytes)),
-
- ?line ok = asn1ct:compile(DataDir ++ "OpenType",
- [?PER,optimize,{outdir,OutDir}]),
- ?line {ok,Bytes} = asn1_wrapper:encode('OpenType','Ot',Stype),
- ?line {ok,Stype} = asn1_wrapper:decode('OpenType','Ot',Bytes).
+ asn1_test_lib:compile("OpenType", Config, [?PER]),
+
+ Stype = {'Stype', 10, true},
+ {ok, Bytes} = asn1_wrapper:encode('OpenType', 'Ot', Stype),
+ {ok, Stype} = asn1_wrapper:decode('OpenType', 'Ot', Bytes),
+
+ ?per_bit_opt(asn1_test_lib:compile("OpenType", Config, [?PER, optimize])),
+ ?per_bit_opt({ok, Bytes}=asn1_wrapper:encode('OpenType', 'Ot', Stype)),
+ ?per_bit_opt({ok, Stype}=asn1_wrapper:decode('OpenType', 'Ot', Bytes)),
+
+ ?uper_bin(asn1_test_lib:compile("OpenType", Config, [uper_bin])),
+ ?uper_bin({ok, Bytes}=asn1_wrapper:encode('OpenType', 'Ot', Stype)),
+ ?uper_bin({ok, Stype}=asn1_wrapper:decode('OpenType', 'Ot', Bytes)),
+
+ asn1_test_lib:compile("OpenType", Config, [?PER, optimize]),
+ {ok, Bytes} = asn1_wrapper:encode('OpenType', 'Ot', Stype),
+ {ok, Stype} = asn1_wrapper:decode('OpenType', 'Ot', Bytes).
testConstraints(suite) ->
- [];
+ [];
testConstraints(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testConstraints:compile(Config,?BER,[]),
- ?line testConstraints:int_constraints(?BER),
+ asn1_test_lib:compile("Constraints", Config, [?BER]),
+ testConstraints:int_constraints(?BER),
- ?line ?ber_driver(?BER,testConstraints:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testConstraints:int_constraints(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("Constraints", Config, [?BER, driver])),
+ ?ber_driver(?BER, testConstraints:int_constraints(?BER)),
- ?line testConstraints:compile(Config,?PER,[]),
- ?line testConstraints:int_constraints(?PER),
- ?line testConstraints:refed_NNL_name(?PER),
+ asn1_test_lib:compile("Constraints", Config, [?PER]),
+ testConstraints:int_constraints(?PER),
+ testConstraints:refed_NNL_name(?PER),
- ?line ?per_bit_opt(testConstraints:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testConstraints:int_constraints(?PER)),
- ?line ?per_bit_opt(testConstraints:refed_NNL_name(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("Constraints", Config, [?PER, optimize])),
+ ?per_bit_opt(testConstraints:int_constraints(?PER)),
+ ?per_bit_opt(testConstraints:refed_NNL_name(?PER)),
- ?line ?uper_bin(testConstraints:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testConstraints:int_constraints(uper_bin)),
- ?line ?uper_bin(testConstraints:refed_NNL_name(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("Constraints", Config, [uper_bin])),
+ ?uper_bin(testConstraints:int_constraints(uper_bin)),
+ ?uper_bin(testConstraints:refed_NNL_name(uper_bin)),
- ?line testConstraints:compile(Config,?PER,[optimize]),
- ?line testConstraints:int_constraints(?PER),
- ?line testConstraints:refed_NNL_name(?PER).
+ asn1_test_lib:compile("Constraints", Config, [?PER, optimize]),
+ testConstraints:int_constraints(?PER),
+ testConstraints:refed_NNL_name(?PER).
testSeqIndefinite(suite) -> [];
testSeqIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("SeqSetIndefinite", Config, [?BER]),
+ testSeqIndefinite:main(?BER),
- ?line testSeqIndefinite:compile(Config,?BER,[]),
- ?line testSeqIndefinite:main(?BER),
-
- ?line ?ber_driver(?BER,testSeqIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSeqIndefinite:main(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqSetIndefinite", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSeqIndefinite:main(?BER)).
testSetIndefinite(suite) -> [];
testSetIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testSetIndefinite:compile(Config,?BER,[]),
- ?line testSetIndefinite:main(?BER),
+ asn1_test_lib:compile("SeqSetIndefinite", Config, [?BER]),
+ testSetIndefinite:main(?BER),
- ?line ?ber_driver(?BER,testSetIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testSetIndefinite:main(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("SeqSetIndefinite", Config, [?BER, driver])),
+ ?ber_driver(?BER, testSetIndefinite:main(?BER)).
testChoiceIndefinite(suite) -> [];
testChoiceIndefinite(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ testChoiceIndefinite:compile(Config, ?BER, []),
+ testChoiceIndefinite:main(?BER),
- ?line testChoiceIndefinite:compile(Config,?BER,[]),
- ?line testChoiceIndefinite:main(?BER),
-
- ?line ?ber_driver(?BER,testChoiceIndefinite:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testChoiceIndefinite:main(?BER)).
+ ?ber_driver(?BER, testChoiceIndefinite:compile(Config, ?BER, [driver])),
+ ?ber_driver(?BER, testChoiceIndefinite:main(?BER)).
testInfObjectClass(suite) ->
[];
testInfObjectClass(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testInfObjectClass:compile(Config,?PER,[]),
- ?line testInfObjectClass:main(?PER),
- ?line testInfObj:compile(Config,?PER,[]),
- ?line testInfObj:main(?PER),
-
- ?line ?per_bit_opt(testInfObjectClass:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testInfObjectClass:main(?PER)),
- ?line ?per_bit_opt(testInfObj:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testInfObj:main(?PER)),
+ Files = ["ErrorClass", "InfClass"],
+ InfObjFiles = ["RANAPextract1", "InfObj", "MAP-ExtensionDataTypes",
+ "Objects", "INAPv2extract"],
+ RANAPFiles = ["RANAP-CommonDataTypes", "RANAP-Constants",
+ "RANAP-Containers", "RANAP-IEs", "RANAP-PDU-Contents",
+ "RANAP-PDU-Descriptions"],
+ asn1_test_lib:compile_all(Files, Config, [?PER]),
+ testInfObjectClass:main(?PER),
+ asn1_test_lib:compile_all(InfObjFiles, Config, [?PER]),
+ testInfObj:main(?PER),
- ?line ?uper_bin(testInfObjectClass:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testInfObjectClass:main(uper_bin)),
- ?line ?uper_bin(testInfObj:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testInfObj:main(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile_all(Files, Config, [uper_bin])),
+ ?uper_bin(testInfObjectClass:main(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile_all(InfObjFiles, Config, [uper_bin])),
+ ?uper_bin(testInfObj:main(uper_bin)),
- ?line testInfObjectClass:compile(Config,?PER,[optimize]),
- ?line testInfObjectClass:main(?PER),
- ?line testInfObj:compile(Config,?PER,[optimize]),
- ?line testInfObj:main(?PER),
+ asn1_test_lib:compile_all(Files, Config, [?PER, optimize]),
+ testInfObjectClass:main(?PER),
+ asn1_test_lib:compile_all(InfObjFiles, Config, [?PER, optimize]),
+ testInfObj:main(?PER),
- ?line testInfObjectClass:compile(Config,?BER,[]),
- ?line testInfObjectClass:main(?BER),
- ?line testInfObj:compile(Config,?BER,[]),
- ?line testInfObj:main(?BER),
+ asn1_test_lib:compile_all(Files, Config, [?BER]),
+ testInfObjectClass:main(?BER),
+ asn1_test_lib:compile_all(InfObjFiles, Config, [?BER]),
+ testInfObj:main(?BER),
- ?line ?ber_driver(?BER,testInfObjectClass:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testInfObjectClass:main(?BER)),
- ?line ?ber_driver(?BER,testInfObj:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testInfObj:main(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile_all(Files, Config, [?BER, driver])),
+ ?ber_driver(?BER, testInfObjectClass:main(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile_all(InfObjFiles, Config, [?BER, driver])),
+ ?ber_driver(?BER, testInfObj:main(?BER)),
- ?line testInfObj:compile_RANAPfiles(Config,?PER,[]),
+ asn1_test_lib:compile_all(RANAPFiles, Config, [?PER]),
- ?line ?per_bit_opt(testInfObj:compile_RANAPfiles(Config,?PER,[optimize])),
+ ?uper_bin(asn1_test_lib:compile_all(RANAPFiles, Config, [uper_bin])),
- ?line ?uper_bin(testInfObj:compile_RANAPfiles(Config,uper_bin,[])),
+ asn1_test_lib:compile_all(RANAPFiles, Config, [?PER, optimize]),
- ?line testInfObj:compile_RANAPfiles(Config,?PER,[optimize]),
-
- ?line testInfObj:compile_RANAPfiles(Config,?BER,[]).
+ asn1_test_lib:compile_all(RANAPFiles, Config, [?BER]).
testParameterizedInfObj(suite) ->
[];
testParameterizedInfObj(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testParameterizedInfObj:compile(Config,?PER,[]),
- ?line testParameterizedInfObj:main(?PER),
+ asn1_test_lib:compile("Param", Config, [?PER]),
+ testParameterizedInfObj:main(?PER),
- ?line ?per_bit_opt(testParameterizedInfObj:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testParameterizedInfObj:main(?PER)),
+ % TODO: Remove all ?per_bit_opt(...) which has an equiv without macro
+ ?per_bit_opt(asn1_test_lib:compile("Param", Config, [?PER, optimize])),
+ ?per_bit_opt(testParameterizedInfObj:main(?PER)),
- ?line ?uper_bin(testParameterizedInfObj:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testParameterizedInfObj:main(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("Param", Config, [uper_bin])),
+ ?uper_bin(testParameterizedInfObj:main(uper_bin)),
- ?line testParameterizedInfObj:compile(Config,?PER,[optimize]),
- ?line testParameterizedInfObj:main(?PER),
+ asn1_test_lib:compile("Param", Config, [?PER, optimize]),
+ testParameterizedInfObj:main(?PER),
- ?line testParameterizedInfObj:compile(Config,?BER,[]),
- ?line testParameterizedInfObj:main(?BER),
+ asn1_test_lib:compile("Param", Config, [?BER]),
+ testParameterizedInfObj:main(?BER),
- ?line ?ber_driver(?BER,testParameterizedInfObj:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testParameterizedInfObj:main(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("Param", Config, [?BER, driver])),
+ ?ber_driver(?BER, testParameterizedInfObj:main(?BER)).
testMergeCompile(suite) ->
[];
testMergeCompile(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testMergeCompile:compile(Config,?PER,[]),
- ?line testMergeCompile:main(?PER),
- ?line testMergeCompile:mvrasn(?PER),
+ Files = ["MS.set.asn", "RANAPSET.set.asn1", "Mvrasn4.set.asn",
+ "Mvrasn6.set.asn"],
+ asn1_test_lib:compile_all(Files, Config, [?PER]),
+ testMergeCompile:main(?PER),
+ testMergeCompile:mvrasn(?PER),
- ?line ?per_bit_opt(testMergeCompile:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testMergeCompile:main(?PER)),
- ?line ?per_bit_opt(testMergeCompile:mvrasn(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile_all(Files, Config, [?PER, optimize])),
+ ?per_bit_opt(testMergeCompile:main(?PER)),
+ ?per_bit_opt(testMergeCompile:mvrasn(?PER)),
- ?line ?uper_bin(testMergeCompile:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testMergeCompile:main(uper_bin)),
- ?line ?uper_bin(testMergeCompile:mvrasn(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile_all(Files, Config, [uper_bin])),
+ ?uper_bin(testMergeCompile:main(uper_bin)),
+ ?uper_bin(testMergeCompile:mvrasn(uper_bin)),
- ?line testMergeCompile:compile(Config,?BER,[]),
- ?line testMergeCompile:main(?BER),
- ?line testMergeCompile:mvrasn(?BER),
+ asn1_test_lib:compile_all(Files, Config, [?BER]),
+ testMergeCompile:main(?BER),
+ testMergeCompile:mvrasn(?BER),
- ?line ?ber_driver(?BER,testMergeCompile:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testMergeCompile:main(?BER)),
- ?line ?ber_driver(?BER,testMergeCompile:mvrasn(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile_all(Files, Config, [?BER, driver])),
+ ?ber_driver(?BER, testMergeCompile:main(?BER)),
+ ?ber_driver(?BER, testMergeCompile:mvrasn(?BER)).
testobj(suite) ->
[];
testobj(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = testRANAP:compile(Config,?PER,[]),
- ?line ok = testRANAP:testobj(?PER),
- ?line ok = testParameterizedInfObj:ranap(?PER),
-
- ?line ?per_bit_opt(ok = testRANAP:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(ok = testRANAP:testobj(?PER)),
- ?line ?per_bit_opt(ok = testParameterizedInfObj:ranap(?PER)),
-
- ?line ?uper_bin(ok = testRANAP:compile(Config,uper_bin,[])),
- ?line ?uper_bin(ok = testRANAP:testobj(uper_bin)),
- ?line ?uper_bin(ok = testParameterizedInfObj:ranap(uper_bin)),
-
- ?line ok = testRANAP:compile(Config,?PER,[optimize]),
- ?line ok = testRANAP:testobj(?PER),
- ?line ok = testParameterizedInfObj:ranap(?PER),
-
- ?line ok = testRANAP:compile(Config,?BER,[]),
- ?line ok = testRANAP:testobj(?BER),
- ?line ok = testParameterizedInfObj:ranap(?BER),
-
- ?line ?ber_driver(?BER,testRANAP:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testRANAP:testobj(?BER)),
- ?line ?ber_driver(?BER,testParameterizedInfObj:ranap(?BER)).
+ ok = testRANAP:compile(Config, [?PER]),
+ ok = testRANAP:testobj(?PER),
+ ok = testParameterizedInfObj:ranap(?PER),
+
+ ?per_bit_opt(ok = testRANAP:compile(Config, [?PER, optimize])),
+ ?per_bit_opt(ok = testRANAP:testobj(?PER)),
+ ?per_bit_opt(ok = testParameterizedInfObj:ranap(?PER)),
+
+ ?uper_bin(ok = testRANAP:compile(Config, [uper_bin])),
+ ?uper_bin(ok = testRANAP:testobj(uper_bin)),
+ ?uper_bin(ok = testParameterizedInfObj:ranap(uper_bin)),
+
+ ok = testRANAP:compile(Config, [?PER, optimize]),
+ ok = testRANAP:testobj(?PER),
+ ok = testParameterizedInfObj:ranap(?PER),
+
+ ok = testRANAP:compile(Config, [?BER]),
+ ok = testRANAP:testobj(?BER),
+ ok = testParameterizedInfObj:ranap(?BER),
+
+ ?ber_driver(?BER, testRANAP:compile(Config, [?BER, driver])),
+ ?ber_driver(?BER, testRANAP:testobj(?BER)),
+ ?ber_driver(?BER, testParameterizedInfObj:ranap(?BER)).
testDeepTConstr(suite) ->
[];
testDeepTConstr(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testDeepTConstr:compile(Config,?PER,[]),
- ?line testDeepTConstr:main(?PER),
+ asn1_test_lib:compile("TConstrChoice", Config, [?PER]),
+ asn1_test_lib:compile("TConstr", Config, [?PER]),
+ testDeepTConstr:main(?PER),
- ?line ?per_bit_opt(testDeepTConstr:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testDeepTConstr:main(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("TConstrChoice", Config, [?PER, optimize])),
+ ?per_bit_opt(asn1_test_lib:compile("TConstr", Config, [?PER, optimize])),
+ ?per_bit_opt(testDeepTConstr:main(?PER)),
- ?line ?uper_bin(testDeepTConstr:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testDeepTConstr:main(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("TConstrChoice", Config, [uper_bin])),
+ ?uper_bin(asn1_test_lib:compile("TConstr", Config, [uper_bin])),
+ ?uper_bin(testDeepTConstr:main(uper_bin)),
- ?line testDeepTConstr:compile(Config,?PER,[optimize]),
- ?line testDeepTConstr:main(?PER),
+ asn1_test_lib:compile("TConstrChoice", Config, [?PER, optimize]),
+ asn1_test_lib:compile("TConstr", Config, [?PER, optimize]),
+ testDeepTConstr:main(?PER),
- ?line testDeepTConstr:compile(Config,?BER,[]),
- ?line testDeepTConstr:main(?BER),
+ asn1_test_lib:compile("TConstrChoice", Config, [?BER]),
+ asn1_test_lib:compile("TConstr", Config, [?BER]),
+ testDeepTConstr:main(?BER),
- ?line ?ber_driver(?BER,testDeepTConstr:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDeepTConstr:main(?BER)).
+ ?ber_driver(?BER, asn1_test_lib:compile("TConstrChoice", Config, [?BER, driver])),
+ ?ber_driver(?BER, asn1_test_lib:compile("TConstr", Config, [?BER, driver])),
+ ?ber_driver(?BER, testDeepTConstr:main(?BER)).
testInvokeMod(suite) ->
[];
testInvokeMod(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"PrimStrings"),[{outdir,OutDir}]),
- ?line {ok,_Result1} = 'PrimStrings':encode('Bs1',[1,0,1,0]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"PrimStrings"),[?PER,{outdir,OutDir}]),
- ?line {ok,_Result2} = 'PrimStrings':encode('Bs1',[1,0,1,0]).
+ asn1_test_lib:compile("PrimStrings", Config, []),
+ {ok, _Result1} = 'PrimStrings':encode('Bs1', [1, 0, 1, 0]),
+ asn1_test_lib:compile("PrimStrings", Config, [?PER]),
+ {ok, _Result2} = 'PrimStrings':encode('Bs1', [1, 0, 1, 0]).
testExport(suite) ->
[];
testExport(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line {error,{asn1,_Reason}} = asn1ct:compile(filename:join(DataDir,"IllegalExport"),[{outdir,OutDir}]).
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ {error, {asn1, _Reason}} =
+ asn1ct:compile(filename:join(DataDir, "IllegalExport"),
+ [{outdir, CaseDir}]).
testImport(suite) ->
[];
testImport(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line _OutDir = ?config(priv_dir,Config),
- ?line {error,_} = asn1ct:compile(filename:join(DataDir,"ImportsFrom"),[?BER]),
- ok.
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(priv_dir, Config),
+ {error, _} = asn1ct:compile(filename:join(DataDir, "ImportsFrom"),
+ [?BER, {outdir, CaseDir}]).
testMegaco(suite) ->
[];
testMegaco(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
- io:format("Config: ~p~n",[Config]),
- ?line {ok,ModuleName1,ModuleName2} = testMegaco:compile(Config,?BER,[]),
- ?line ok = testMegaco:main(ModuleName1,Config),
- ?line ok = testMegaco:main(ModuleName2,Config),
+ {ok, ModuleName1, ModuleName2} = testMegaco:compile(Config, ?BER, []),
+ ok = testMegaco:main(ModuleName1, Config),
+ ok = testMegaco:main(ModuleName2, Config),
case ?BER of
- ber_bin_v2 ->
- ?line {ok,ModuleName3,ModuleName4} = testMegaco:compile(Config,?BER,[driver]),
- ?line ok = testMegaco:main(ModuleName3,Config),
- ?line ok = testMegaco:main(ModuleName4,Config);
- _-> ok
+ ber_bin_v2 ->
+ {ok, ModuleName3, ModuleName4} = testMegaco:compile(Config, ?BER, [driver]),
+ ok = testMegaco:main(ModuleName3, Config),
+ ok = testMegaco:main(ModuleName4, Config);
+ _->
+ ok
end,
- ?line {ok,ModuleName5,ModuleName6} = testMegaco:compile(Config,?PER,[]),
- ?line ok = testMegaco:main(ModuleName5,Config),
- ?line ok = testMegaco:main(ModuleName6,Config),
+ {ok, ModuleName5, ModuleName6} = testMegaco:compile(Config, ?PER, []),
+ ok = testMegaco:main(ModuleName5, Config),
+ ok = testMegaco:main(ModuleName6, Config),
- ?line ?per_bit_opt({ok,ModuleName5,ModuleName6} = testMegaco:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(ok = testMegaco:main(ModuleName5,Config)),
- ?line ?per_bit_opt(ok = testMegaco:main(ModuleName6,Config)),
+ ?per_bit_opt({ok, ModuleName5, ModuleName6} = testMegaco:compile(Config, ?PER, [optimize])),
+ ?per_bit_opt(ok = testMegaco:main(ModuleName5, Config)),
+ ?per_bit_opt(ok = testMegaco:main(ModuleName6, Config)),
- ?line ?uper_bin({ok,ModuleName5,ModuleName6} = testMegaco:compile(Config,uper_bin,[])),
- ?line ?uper_bin(ok = testMegaco:main(ModuleName5,Config)),
- ?line ?uper_bin(ok = testMegaco:main(ModuleName6,Config)),
+ ?uper_bin({ok, ModuleName5, ModuleName6} = testMegaco:compile(Config, uper_bin, [])),
+ ?uper_bin(ok = testMegaco:main(ModuleName5, Config)),
+ ?uper_bin(ok = testMegaco:main(ModuleName6, Config)),
- ?line {ok,ModuleName7,ModuleName8} = testMegaco:compile(Config,?PER,[optimize]),
- ?line ok = testMegaco:main(ModuleName7,Config),
- ?line ok = testMegaco:main(ModuleName8,Config).
+ {ok, ModuleName7, ModuleName8} = testMegaco:compile(Config, ?PER, [optimize]),
+ ok = testMegaco:main(ModuleName7, Config),
+ ok = testMegaco:main(ModuleName8, Config).
testMvrasn6(suite) -> [];
testMvrasn6(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testMvrasn6:compile(Config,?BER),
- ?line testMvrasn6:main().
+ asn1_test_lib:compile("Mvrasn-21-4", Config, [?BER]),
+ asn1_test_lib:compile("Mvrasn-20-6", Config, [?BER]),
+ asn1_test_lib:compile("Mvrasn-19-6", Config, [?BER]),
+ asn1_test_lib:compile("Mvrasn-15-6", Config, [?BER]),
+ asn1_test_lib:compile("Mvrasn-18-6", Config, [?BER]),
+ asn1_test_lib:compile("Mvrasn-14-6", Config, [?BER]),
+ asn1_test_lib:compile("Mvrasn-11-6", Config, [?BER]).
testContextSwitchingTypes(suite) -> [];
testContextSwitchingTypes(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("ContextSwitchingTypes", Config, [?BER]),
+ testContextSwitchingTypes:test(Config),
- ?line testContextSwitchingTypes:compile(Config,?BER,[]),
- ?line testContextSwitchingTypes:test(Config),
+ ?ber_driver(?BER, asn1_test_lib:compile("ContextSwitchingTypes", Config, [?BER, driver])),
+ ?ber_driver(?BER, testContextSwitchingTypes:test(Config)),
- ?line ?ber_driver(?BER,testContextSwitchingTypes:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testContextSwitchingTypes:test(Config)),
+ asn1_test_lib:compile("ContextSwitchingTypes", Config, [?PER]),
+ testContextSwitchingTypes:test(Config),
- ?line testContextSwitchingTypes:compile(Config,?PER,[]),
- ?line testContextSwitchingTypes:test(Config),
+ ?per_bit_opt(asn1_test_lib:compile("ContextSwitchingTypes", Config, [?PER, optimize])),
+ ?per_bit_opt(testContextSwitchingTypes:test(Config)),
- ?line ?per_bit_opt(testContextSwitchingTypes:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testContextSwitchingTypes:test(Config)),
+ ?uper_bin(asn1_test_lib:compile("ContextSwitchingTypes", Config, [uper_bin])),
+ ?uper_bin(testContextSwitchingTypes:test(Config)),
- ?line ?uper_bin(testContextSwitchingTypes:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testContextSwitchingTypes:test(Config)),
-
- ?line testContextSwitchingTypes:compile(Config,?PER,[optimize]),
- ?line testContextSwitchingTypes:test(Config).
+ asn1_test_lib:compile("ContextSwitchingTypes", Config, [?PER, optimize]),
+ testContextSwitchingTypes:test(Config).
testTypeValueNotation(suite) -> [];
testTypeValueNotation(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
+ Files = ["SeqTypeRefPrim",
+ "ValueTest"], % OTP-6695
case ?BER of
- Ber when Ber == ber; Ber == ber_bin ->
- ?line testTypeValueNotation:compile(Config,?BER,[]),
- ?line testTypeValueNotation:main(?BER,dummy);
- _ ->
- ok
+ Ber when Ber == ber; Ber == ber_bin ->
+ asn1_test_lib:compile_all(Files, Config, [?BER]),
+ testTypeValueNotation:main(?BER, dummy);
+ _ ->
+ ok
end,
- ?line ?ber_driver(?BER,testTypeValueNotation:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testTypeValueNotation:main(?BER,optimize)),
+ ?ber_driver(?BER, asn1_test_lib:compile_all(Files, Config, [?BER, driver])),
+ ?ber_driver(?BER, testTypeValueNotation:main(?BER, optimize)),
case ?BER of
- Ber2 when Ber2 == ber; Ber2 == ber_bin ->
- ?line testTypeValueNotation:compile(Config,?PER,[]),
- ?line testTypeValueNotation:main(?PER,dummy);
- _ ->
- ok
+ Ber2 when Ber2 == ber; Ber2 == ber_bin ->
+ asn1_test_lib:compile_all(Files, Config, [?PER]),
+ testTypeValueNotation:main(?PER, dummy);
+ _ ->
+ ok
end,
- ?line ?per_bit_opt(testTypeValueNotation:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testTypeValueNotation:main(?PER,optimize)),
+ ?per_bit_opt(asn1_test_lib:compile_all(Files, Config, [?PER, optimize])),
+ ?per_bit_opt(testTypeValueNotation:main(?PER, optimize)),
- ?line ?uper_bin(testTypeValueNotation:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testTypeValueNotation:main(uper_bin,optimize)),
+ ?uper_bin(asn1_test_lib:compile_all(Files, Config, [uper_bin])),
+ ?uper_bin(testTypeValueNotation:main(uper_bin, optimize)),
case ?BER of
- Ber3 when Ber3 == ber; Ber3 == ber_bin ->
- ?line testTypeValueNotation:compile(Config,?PER,[optimize]),
- ?line testTypeValueNotation:main(?PER,optimize);
- _ ->
- ok
+ Ber3 when Ber3 == ber; Ber3 == ber_bin ->
+ asn1_test_lib:compile_all(Files, Config, [?PER, optimize]),
+ testTypeValueNotation:main(?PER, optimize);
+ _ ->
+ ok
end.
testOpenTypeImplicitTag(suite) -> [];
testOpenTypeImplicitTag(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("OpenTypeImplicitTag", Config, [?BER]),
+ testOpenTypeImplicitTag:main(?BER),
- ?line testOpenTypeImplicitTag:compile(Config,?BER,[]),
- ?line testOpenTypeImplicitTag:main(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("OpenTypeImplicitTag", Config, [?BER, driver])),
+ ?ber_driver(?BER, testOpenTypeImplicitTag:main(?BER)),
- ?line ?ber_driver(?BER,testOpenTypeImplicitTag:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testOpenTypeImplicitTag:main(?BER)),
+ asn1_test_lib:compile("OpenTypeImplicitTag", Config, [?PER]),
+ testOpenTypeImplicitTag:main(?PER),
- ?line testOpenTypeImplicitTag:compile(Config,?PER,[]),
- ?line testOpenTypeImplicitTag:main(?PER),
+ ?per_bit_opt(asn1_test_lib:compile("OpenTypeImplicitTag", Config, [?PER, optimize])),
+ ?per_bit_opt(testOpenTypeImplicitTag:main(?PER)),
- ?line ?per_bit_opt(testOpenTypeImplicitTag:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testOpenTypeImplicitTag:main(?PER)),
+ ?uper_bin(asn1_test_lib:compile("OpenTypeImplicitTag", Config, [uper_bin])),
+ ?uper_bin(testOpenTypeImplicitTag:main(uper_bin)),
- ?line ?uper_bin(testOpenTypeImplicitTag:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testOpenTypeImplicitTag:main(uper_bin)),
-
- ?line testOpenTypeImplicitTag:compile(Config,?PER,[optimize]),
- ?line testOpenTypeImplicitTag:main(?PER).
+ asn1_test_lib:compile("OpenTypeImplicitTag", Config, [?PER, optimize]),
+ testOpenTypeImplicitTag:main(?PER).
duplicate_tags(suite) -> [];
duplicate_tags(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- {error,{asn1,[{error,{type,_,_,'SeqOpt1Imp',{asn1,{duplicates_of_the_tags,_}}}}]}} =
- asn1ct:compile(filename:join(DataDir,"SeqOptional2"),[abs]),
- ok.
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ {error, {asn1, [{error, {type, _, _, 'SeqOpt1Imp', {asn1, {duplicates_of_the_tags, _}}}}]}} =
+ asn1ct:compile(filename:join(DataDir, "SeqOptional2"),
+ [abs, {outdir, CaseDir}]).
rtUI(suite) -> [];
-rtUI(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Prim"),[?BER]),
- ?line {ok,_} = asn1rt:info('Prim'),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"Prim"),[?PER]),
- ?line {ok,_} = asn1rt:info('Prim').
+rtUI(Config) ->
+ asn1_test_lib:compile("Prim", Config, [?BER]),
+ {ok, _} = asn1rt:info('Prim'),
+ asn1_test_lib:compile("Prim", Config, [?PER]),
+ {ok, _} = asn1rt:info('Prim').
testROSE(suite) -> [];
-testROSE(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testROSE:compile(Config,?BER,[]),
-
- ?line testROSE:compile(Config,?PER,[]),
- ?line ?per_bit_opt(testROSE:compile(Config,?PER,[optimize])),
- ?line ?uper_bin(testROSE:compile(Config,uper_bin,[])),
- ?line testROSE:compile(Config,?PER,[optimize]).
+testROSE(Config) ->
+ asn1_test_lib:compile("Remote-Operations-Merged.set.asn1", Config, [?BER]),
+ asn1_test_lib:compile("Remote-Operations-Merged.set.asn1", Config, [?PER]),
+ ?per_bit_opt(asn1_test_lib:compile("Remote-Operations-Merged.set.asn1", Config, [?PER, optimize])),
+ ?uper_bin(asn1_test_lib:compile("Remote-Operations-Merged.set.asn1", Config, [uper_bin])),
+ asn1_test_lib:compile("Remote-Operations-Merged.set.asn1", Config, [?PER, optimize]).
testINSTANCE_OF(suite) -> [];
testINSTANCE_OF(Config) ->
- ?line testINSTANCE_OF:compile(Config,?BER,[]),
- ?line testINSTANCE_OF:main(?BER),
+ asn1_test_lib:compile("INSTANCEOF.asn1", Config, [?BER]),
+ testINSTANCE_OF:main(?BER),
- ?line ?ber_driver(?BER,testINSTANCE_OF:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testINSTANCE_OF:main(?BER)),
+ ?ber_driver(?BER, asn1_test_lib:compile("INSTANCEOF.asn1", Config, [?BER, driver])),
+ ?ber_driver(?BER, testINSTANCE_OF:main(?BER)),
- ?line testINSTANCE_OF:compile(Config,?PER,[]),
- ?line testINSTANCE_OF:main(?PER),
+ asn1_test_lib:compile("INSTANCEOF.asn1", Config, [?PER]),
+ testINSTANCE_OF:main(?PER),
- ?line ?per_bit_opt(testINSTANCE_OF:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testINSTANCE_OF:main(?PER)),
+ ?per_bit_opt(asn1_test_lib:compile("INSTANCEOF.asn1", Config, [?PER, optimize])),
+ ?per_bit_opt(testINSTANCE_OF:main(?PER)),
- ?line ?uper_bin(testINSTANCE_OF:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testINSTANCE_OF:main(uper_bin)),
+ ?uper_bin(asn1_test_lib:compile("INSTANCEOF.asn1", Config, [uper_bin])),
+ ?uper_bin(testINSTANCE_OF:main(uper_bin)),
- ?line testINSTANCE_OF:compile(Config,?PER,[optimize]),
- ?line testINSTANCE_OF:main(?PER).
+ asn1_test_lib:compile("INSTANCEOF.asn1", Config, [?PER, optimize]),
+ testINSTANCE_OF:main(?PER).
testTCAP(suite) -> [];
testTCAP(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line testTCAP:compile(Config,?BER,[]),
- ?line testTCAP:test(?BER,Config),
+ testTCAP:compile(Config, [?BER]),
+ testTCAP:test(?BER, Config),
- ?line ?ber_driver(?BER,testTCAP:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testTCAP:test(?BER,Config)),
+ ?ber_driver(?BER, testTCAP:compile(Config, [?BER, driver])),
+ ?ber_driver(?BER, testTCAP:test(?BER, Config)),
- ?line ?ber_driver(?BER,testTCAP:compile_asn1config(Config,?BER,[asn1config])),
- ?line ?ber_driver(?BER,testTCAP:test_asn1config()).
+ ?ber_driver(?BER, testTCAP:compile_asn1config(Config, [?BER, asn1config])),
+ ?ber_driver(?BER, testTCAP:test_asn1config()).
testDER(suite) ->[];
testDER(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
+ asn1_test_lib:compile("DERSpec", Config, [?BER, der]),
+ testDER:test(),
- ?line testDER:compile(Config,?BER,[]),
- ?line testDER:test(),
+ ?ber_driver(?BER, asn1_test_lib:compile("DERSpec", Config, [?BER, der, driver])),
+ ?ber_driver(?BER, testDER:test()),
- ?line ?ber_driver(?BER,testDER:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDER:test()),
+ asn1_test_lib:compile("ParamBasic", Config, [?BER, der]),
+ testParamBasic_cases(der),
- ?line testParamBasic:compile_der(Config,?BER),
- ?line testParamBasic_cases(der),
-
-
- ?line testSeqSetDefaultVal:compile(Config,?BER),
- ?line testSeqSetDefaultVal_cases(?BER).
+ asn1_test_lib:compile("Default", Config, [?BER, der]),
+ testSeqSetDefaultVal_cases(?BER).
testSeqSetDefaultVal_cases(?BER) ->
- ?line testSeqSetDefaultVal:main(?BER).
+ testSeqSetDefaultVal:main(?BER).
specialized_decodes(suite) -> [];
specialized_decodes(Config) ->
- ?line test_partial_incomplete_decode:compile(Config,?BER,[optimize]),
- ?line test_partial_incomplete_decode:test(?BER,Config),
- ?line test_selective_decode:test(?BER,Config).
+ case ?BER of
+ ber_bin_v2 ->
+ asn1_test_lib:compile_all(["PartialDecSeq.asn",
+ "PartialDecSeq2.asn",
+ "PartialDecSeq3.asn",
+ "PartialDecMyHTTP.asn",
+ "MEDIA-GATEWAY-CONTROL.asn",
+ "P-Record"],
+ Config, [?BER, optimize, asn1config]),
+ test_partial_incomplete_decode:test(Config),
+ test_selective_decode:test();
+ Rule ->
+ {skip, lists:concat(["not implemented yet for version: ", Rule])}
+ end.
special_decode_performance(suite) ->[];
special_decode_performance(Config) ->
- ?line ?ber_driver(?BER,test_special_decode_performance:compile(Config,?BER)),
- ?line ?ber_driver(?BER,test_special_decode_performance:go(all)).
+ Files = ["MEDIA-GATEWAY-CONTROL", "PartialDecSeq"],
+ ?ber_driver(?BER, asn1_test_lib:compile_all(Files, Config,
+ [?BER, optimize, asn1config])),
+ ?ber_driver(?BER, test_special_decode_performance:go(all)).
test_driver_load(suite) -> [];
test_driver_load(Config) ->
- ?line test_driver_load:compile(Config,?PER),
- ?line test_driver_load:test(?PER,5).
+ case ?PER of
+ per_bin ->
+ asn1_test_lib:compile("P-Record", Config, [?PER, optimize]),
+ test_driver_load:test(5);
+ _ ->
+ ok
+ end.
test_ParamTypeInfObj(suite) -> [];
test_ParamTypeInfObj(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"IN-CS-1-Datatypes"),[ber_bin]).
+ asn1_test_lib:compile("IN-CS-1-Datatypes", Config, [ber_bin]).
test_WS_ParamClass(suite) -> [];
test_WS_ParamClass(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"InformationFramework"),
- [ber_bin]).
+ asn1_test_lib:compile("InformationFramework", Config, [ber_bin]).
test_Defed_ObjectIdentifier(suite) -> [];
test_Defed_ObjectIdentifier(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line ok = asn1ct:compile(filename:join(DataDir,"UsefulDefinitions"),
- [ber_bin]).
+ asn1_test_lib:compile("UsefulDefinitions", Config, [ber_bin]).
testSelectionType(suite) -> [];
testSelectionType(Config) ->
-
- ?line ok = testSelectionTypes:compile(Config,?BER,[]),
- ?line {ok,_} = testSelectionTypes:test(),
-
- ?line ok = testSelectionTypes:compile(Config,?PER,[]),
- ?line {ok,_} = testSelectionTypes:test().
+ asn1_test_lib:compile("SelectionType", Config, [?BER]),
+ {ok, _} = testSelectionTypes:test(),
+ asn1_test_lib:compile("SelectionType", Config, [?PER]),
+ {ok, _} = testSelectionTypes:test().
testSSLspecs(suite) -> [];
testSSLspecs(Config) ->
-
- ?line ok = testSSLspecs:compile(Config,?BER,
- [optimize,compact_bit_string,der]),
- ?line testSSLspecs:run(?BER),
+ ok = testSSLspecs:compile(Config,
+ [?BER, optimize, compact_bit_string, der]),
+ testSSLspecs:run(?BER),
case code:which(asn1ct) of
cover_compiled ->
- ok;
+ ok;
_ ->
- ?line ok = testSSLspecs:compile_inline(Config,?BER),
- ?line ok = testSSLspecs:run_inline(?BER)
+ ok = testSSLspecs:compile_inline(Config, ?BER),
+ ok = testSSLspecs:run_inline(?BER)
end.
testNortel(suite) -> [];
testNortel(Config) ->
- ?line DataDir = ?config(data_dir,Config),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),[?BER]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?BER,optimize]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?BER,optimize,driver]),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),[?PER]),
- ?line ?per_bit_opt(ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?PER,optimize])),
- ?line ?uper_bin(ok = asn1ct:compile(filename:join(DataDir,"Nortel"),[uper_bin])),
- ?line ok = asn1ct:compile(filename:join(DataDir,"Nortel"),
- [?PER,optimize]).
+ asn1_test_lib:compile("Nortel", Config, [?BER]),
+ asn1_test_lib:compile("Nortel", Config, [?BER, optimize]),
+ asn1_test_lib:compile("Nortel", Config, [?BER, optimize, driver]),
+ asn1_test_lib:compile("Nortel", Config, [?PER]),
+ ?per_bit_opt(asn1_test_lib:compile("Nortel", Config, [?PER, optimize])),
+ ?uper_bin(asn1_test_lib:compile("Nortel", Config, [uper_bin])),
+ asn1_test_lib:compile("Nortel", Config, [?PER, optimize]).
+
test_undecoded_rest(suite) -> [];
test_undecoded_rest(Config) ->
+ asn1_test_lib:compile("P-Record", Config, [?BER]),
+ ok = test_undecoded_rest:test([], Config),
- ?line ok = test_undecoded_rest:compile(Config,?BER,[]),
- ?line ok = test_undecoded_rest:test([], Config),
-
- ?line ok = test_undecoded_rest:compile(Config,?BER,[undec_rest]),
- ?line ok = test_undecoded_rest:test(undec_rest, Config),
+ asn1_test_lib:compile("P-Record", Config, [?BER, undec_rest]),
+ ok = test_undecoded_rest:test(undec_rest, Config),
- ?line ok = test_undecoded_rest:compile(Config,?PER,[]),
- ?line ok = test_undecoded_rest:test([], Config),
+ asn1_test_lib:compile("P-Record", Config, [?PER]),
+ ok = test_undecoded_rest:test([], Config),
- ?line ?per_bit_opt(ok = test_undecoded_rest:compile(Config,?PER,[optimize,undec_rest])),
- ?line ?per_bit_opt(ok = test_undecoded_rest:test(undec_rest, Config)),
+ ?per_bit_opt(asn1_test_lib:compile("P-Record", Config, [?PER, optimize, undec_rest])),
+ ?per_bit_opt(ok = test_undecoded_rest:test(undec_rest, Config)),
- ?line ?uper_bin(ok = test_undecoded_rest:compile(Config,uper_bin,[undec_rest])),
- ?line ?uper_bin(ok = test_undecoded_rest:test(undec_rest, Config)),
+ ?uper_bin(asn1_test_lib:compile("P-Record", Config, [uper_bin, undec_rest])),
+ ?uper_bin(ok = test_undecoded_rest:test(undec_rest, Config)),
- ?line ok = test_undecoded_rest:compile(Config,?PER,[undec_rest]),
- ?line ok = test_undecoded_rest:test(undec_rest, Config).
+ asn1_test_lib:compile("P-Record", Config, [?PER, undec_rest]),
+ ok = test_undecoded_rest:test(undec_rest, Config).
test_inline(suite) -> [];
test_inline(Config) ->
case code:which(asn1ct) of
cover_compiled ->
- {skip,"Not runnable when cover compiled"};
+ {skip, "Not runnable when cover compiled"};
_ ->
- ?line ok=test_inline:compile(Config,?BER,[]),
- ?line test_inline:main(Config, ?BER),
- ?line test_inline:inline1(Config,?BER,[]),
- ?line test_inline:performance2()
+ ok=test_inline:compile(Config, []),
+ test_inline:main(Config, ?BER),
+ test_inline:inline1(Config, ?BER, []),
+ test_inline:performance2()
end.
%test_inline_prf(suite) -> [];
%test_inline_prf(Config) ->
-% ?line test_inline:performance(Config).
+% test_inline:performance(Config).
testTcapsystem(suite) -> [];
testTcapsystem(Config) ->
- ?line ok=testTcapsystem:compile(Config,?BER,[]).
+ testTcapsystem:compile(Config, [?BER]).
testNBAPsystem(suite) -> [];
testNBAPsystem(Config) ->
- ?line ok=testNBAPsystem:compile(Config,?PER,?per_optimize(?BER)),
- ?line ok=testNBAPsystem:test(?PER,Config).
+ ok=testNBAPsystem:compile(Config, [?PER|?per_optimize(?BER)]),
+ ok=testNBAPsystem:test(?PER, Config).
test_compile_options(suite) -> [];
test_compile_options(Config) ->
case code:which(asn1ct) of
cover_compiled ->
- {skip,"Not runnable when cover compiled"};
+ {skip, "Not runnable when cover compiled"};
_ ->
- ?line ok = test_compile_options:wrong_path(Config),
- ?line ok = test_compile_options:path(Config),
- ?line ok = test_compile_options:noobj(Config),
- ?line ok = test_compile_options:record_name_prefix(Config),
- ?line ok = test_compile_options:verbose(Config),
- ?line ok = test_compile_options:warnings_as_errors(Config)
+ ok = test_compile_options:wrong_path(Config),
+ ok = test_compile_options:path(Config),
+ ok = test_compile_options:noobj(Config),
+ ok = test_compile_options:record_name_prefix(Config),
+ ok = test_compile_options:verbose(Config),
+ ok = test_compile_options:warnings_as_errors(Config)
end.
testDoubleEllipses(suite) -> [];
testDoubleEllipses(Config) ->
- ?line testDoubleEllipses:compile(Config,?BER,[]),
- ?line testDoubleEllipses:main(?BER),
- ?line ?ber_driver(?BER,testDoubleEllipses:compile(Config,?BER,[driver])),
- ?line ?ber_driver(?BER,testDoubleEllipses:main(?BER)),
- ?line ?per_bit_opt(testDoubleEllipses:compile(Config,?PER,[optimize])),
- ?line ?per_bit_opt(testDoubleEllipses:main(?PER)),
- ?line ?uper_bin(testDoubleEllipses:compile(Config,uper_bin,[])),
- ?line ?uper_bin(testDoubleEllipses:main(uper_bin)),
- ?line testDoubleEllipses:compile(Config,?PER,?per_optimize(?BER)),
- ?line testDoubleEllipses:main(?PER).
+ asn1_test_lib:compile("DoubleEllipses", Config, [?BER]),
+ testDoubleEllipses:main(?BER),
+ ?ber_driver(?BER, asn1_test_lib:compile("DoubleEllipses", Config, [?BER, driver])),
+ ?ber_driver(?BER, testDoubleEllipses:main(?BER)),
+ ?per_bit_opt(asn1_test_lib:compile("DoubleEllipses", Config, [?PER, optimize])),
+ ?per_bit_opt(testDoubleEllipses:main(?PER)),
+ ?uper_bin(asn1_test_lib:compile("DoubleEllipses", Config, [uper_bin])),
+ ?uper_bin(testDoubleEllipses:main(uper_bin)),
+ asn1_test_lib:compile("DoubleEllipses", Config, [?PER|?per_optimize(?BER)]),
+ testDoubleEllipses:main(?PER).
test_modified_x420(suite) -> [];
test_modified_x420(Config) ->
- ?line test_modified_x420:compile(Config),
- ?line test_modified_x420:test_io(Config).
+ test_modified_x420:compile(Config),
+ test_modified_x420:test_io(Config).
testX420(suite) -> [];
testX420(Config) ->
- ?line testX420:compile(?BER,[der],Config),
- ?line ok = testX420:ticket7759(?BER,Config),
- ?line testX420:compile(?PER,[],Config).
+ testX420:compile(?BER, [der], Config),
+ ok = testX420:ticket7759(?BER, Config),
+ testX420:compile(?PER, [], Config).
test_x691(suite) -> [];
test_x691(Config) ->
case ?PER of
- per ->
- ?line ok = test_x691:compile(Config,uper_bin,[]),
- ?line true = test_x691:cases(uper_bin,unaligned),
- ?line ok = test_x691:compile(Config,?PER,[]),
- ?line true = test_x691:cases(?PER,aligned),
-%% ?line ok = asn1_test_lib:ticket_7678(Config,[]),
- ?line ok = asn1_test_lib:ticket_7708(Config,[]),
- ?line ok = asn1_test_lib:ticket_7763(Config);
- _ ->
- ?line ok = test_x691:compile(Config,?PER,?per_optimize(?BER)),
- ?line true = test_x691:cases(?PER,aligned)
+ per ->
+ ok = test_x691:compile(Config, [uper_bin]),
+ true = test_x691:cases(uper_bin, unaligned),
+ ok = test_x691:compile(Config, [?PER]),
+ true = test_x691:cases(?PER, aligned),
+ ok = asn1_test_lib:ticket_7708(Config, []),
+ ok = asn1_test_lib:ticket_7763(Config);
+ _ ->
+ ok = test_x691:compile(Config, [?PER|?per_optimize(?BER)]),
+ true = test_x691:cases(?PER, aligned)
end.
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[]),
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[compact_bit_string]),
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[optimize]),
-%% ?line ok = asn1_test_lib:ticket_7876(Config,?PER,[optimize,compact_bit_string]).
-
ticket_6143(suite) -> [];
ticket_6143(Config) ->
- ?line ok = test_compile_options:ticket_6143(Config).
+ ok = test_compile_options:ticket_6143(Config).
testExtensionAdditionGroup(suite) -> [];
testExtensionAdditionGroup(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line PrivDir = ?config(priv_dir,Config),
- ?line Path = code:get_path(),
- ?line code:add_patha(PrivDir),
- DoIt = fun(Erule) ->
- ?line ok = asn1ct:compile(filename:join(DataDir,"Extension-Addition-Group"),Erule ++ [{outdir,PrivDir}]),
- ?line {ok,_M} = compile:file(filename:join(DataDir,"extensionAdditionGroup"),[{i,PrivDir},{outdir,PrivDir},debug_info]),
- ?line ok = extensionAdditionGroup:run(Erule),
- ?line ok = extensionAdditionGroup:run2(Erule),
- ?line ok = asn1ct:compile(filename:join(DataDir,"EUTRA-RRC-Definitions"),Erule ++ [{record_name_prefix,"RRC-"},{outdir,PrivDir}]),
- ?line ok = extensionAdditionGroup:run3(Erule)
- end,
- ?line [DoIt(Rule)|| Rule <- [[per_bin],[per_bin,optimize],[uper_bin]]],
- %% FIXME problems with automatic tags [ber_bin],[ber_bin,optimize]
- ?line code:set_path(Path).
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ Path = code:get_path(),
+ DoIt = fun(Erule) ->
+ ok = asn1ct:compile(filename:join(DataDir, "Extension-Addition-Group"), Erule ++ [{outdir, PrivDir}]),
+ {ok, _M} = compile:file(filename:join(DataDir, "extensionAdditionGroup"), [{i, PrivDir}, {outdir, PrivDir}, debug_info]),
+ ok = extensionAdditionGroup:run(Erule),
+ ok = extensionAdditionGroup:run2(Erule),
+ ok = asn1ct:compile(filename:join(DataDir, "EUTRA-RRC-Definitions"), Erule ++ [{record_name_prefix, "RRC-"}, {outdir, PrivDir}]),
+ ok = extensionAdditionGroup:run3(Erule)
+ end,
+ [DoIt(Rule)|| Rule <- [[per_bin], [per_bin, optimize], [uper_bin]]],
+ %% FIXME problems with automatic tags [ber_bin], [ber_bin, optimize]
+ code:set_path(Path).
% parse_modules() ->
-% ["ImportsFrom"].
+% ["ImportsFrom"].
per_modules() ->
- [X || X <- test_modules()].
+ [X || X <- test_modules()].
ber_modules() ->
- [X || X <- test_modules(),
- X =/= "CommonDataTypes",
- X =/= "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
- X =/= "H323-MESSAGES",
- X =/= "H235-SECURITY-MESSAGES",
- X =/= "MULTIMEDIA-SYSTEM-CONTROL"].
+ [X || X <- test_modules(),
+ X =/= "CommonDataTypes",
+ X =/= "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
+ X =/= "H323-MESSAGES",
+ X =/= "H235-SECURITY-MESSAGES",
+ X =/= "MULTIMEDIA-SYSTEM-CONTROL"].
test_modules() ->
_Modules = [
- "BitStr",
- "CAP",
- "CommonDataTypes",
- "Constraints",
- "ContextSwitchingTypes",
- "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
- "Enum",
- "From",
- "H235-SECURITY-MESSAGES",
- "H323-MESSAGES",
- %%"MULTIMEDIA-SYSTEM-CONTROL", recursive type , problem for asn1ct:value
- "Import",
- "Int",
- "MAP-commonDataTypes",
-% ambigous tags "MAP-insertSubscriberData-def",
- "Null",
- "Octetstr",
- "One",
- "P-Record",
- "P",
-% "PDUs",
- "Person",
- "PrimStrings",
- "Real",
- "XSeq",
- "XSeqOf",
- "XSet",
- "XSetOf",
- "String",
- "SwCDR",
-% "Syntax",
- "Time"
-% ANY "Tst",
-% "Two",
+ "BitStr",
+ "CAP",
+ "CommonDataTypes",
+ "Constraints",
+ "ContextSwitchingTypes",
+ "DS-EquipmentUser-CommonFunctionOrig-TransmissionPath",
+ "Enum",
+ "From",
+ "H235-SECURITY-MESSAGES",
+ "H323-MESSAGES",
+ %%"MULTIMEDIA-SYSTEM-CONTROL", recursive type , problem for asn1ct:value
+ "Import",
+ "Int",
+ "MAP-commonDataTypes",
+% ambigous tags "MAP-insertSubscriberData-def",
+ "Null",
+ "Octetstr",
+ "One",
+ "P-Record",
+ "P",
+% "PDUs",
+ "Person",
+ "PrimStrings",
+ "Real",
+ "XSeq",
+ "XSeqOf",
+ "XSet",
+ "XSetOf",
+ "String",
+ "SwCDR",
+% "Syntax",
+ "Time"
+% ANY "Tst",
+% "Two",
% errors that should be detected "UndefType"
] ++
- [
- "SeqSetLib", % must be compiled before Seq and Set
- "Seq",
- "Set",
- "SetOf",
- "SeqOf",
- "Prim",
- "Cho",
- "Def",
+ [
+ "SeqSetLib", % must be compiled before Seq and Set
+ "Seq",
+ "Set",
+ "SetOf",
+ "SeqOf",
+ "Prim",
+ "Cho",
+ "Def",
"Opt",
- "ELDAPv3",
- "LDAP"
- ].
+ "ELDAPv3",
+ "LDAP"
+ ].
test_OTP_9688(Config) ->
Asn1Mod = "OTP-9688.asn1",
diff --git a/lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src b/lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src
index 4c3c8c7808..6386feae17 100644
--- a/lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src
+++ b/lib/asn1/test/asn1_bin_v2_particular_SUITE.erl.src
@@ -10,8 +10,8 @@ smp(Config) ->
io:format("smp starting ~p workers\n",[NumOfProcs]),
?line Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
- ?line ok = testNBAPsystem:compile(Config,per_bin,[optimize]),
-
+ ?line ok = testNBAPsystem:compile(Config, [per_bin, optimize]),
+
enc_dec(NumOfProcs,Msg,2),
N = 10000,
@@ -19,7 +19,7 @@ smp(Config) ->
?line {Time1,ok} = timer:tc(?MODULE,enc_dec,[NumOfProcs,Msg, N]),
?line {Time1S,ok} = timer:tc(?MODULE,enc_dec,[1, Msg, NumOfProcs * N]),
- ?line ok = testNBAPsystem:compile(Config,ber_bin,[optimize,nif]),
+ ?line ok = testNBAPsystem:compile(Config, [ber_bin, optimize, nif]),
?line {Time3,ok} = timer:tc(?MODULE,enc_dec,[NumOfProcs,Msg, N]),
?line {Time3S,ok} = timer:tc(?MODULE,enc_dec,[1, Msg, NumOfProcs * N]),
@@ -40,10 +40,10 @@ per_performance(Config) ->
file:make_dir(NifDir),file:make_dir(ErlDir),
?line Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
- ?line ok = testNBAPsystem:compile([{priv_dir,NifDir}|Config],per_bin,
- [optimize]),
- ?line ok = testNBAPsystem:compile([{priv_dir,ErlDir}|Config],per_bin,
- []),
+ ?line ok = testNBAPsystem:compile([{priv_dir,NifDir}|Config],
+ [per_bin, optimize]),
+ ?line ok = testNBAPsystem:compile([{priv_dir,ErlDir}|Config],
+ [per_bin]),
Modules = ['NBAP-CommonDataTypes',
'NBAP-Constants',
@@ -81,7 +81,7 @@ per_performance(Config) ->
ber_performance(Config) ->
?line Msg = {initiatingMessage, testNBAPsystem:cell_setup_req_msg()},
- ?line ok = testNBAPsystem:compile(Config,ber_bin,[optimize,nif]),
+ ?line ok = testNBAPsystem:compile(Config, [ber_bin, optimize, nif]),
BerFun = fun() ->
diff --git a/lib/asn1/test/asn1_test_lib.erl b/lib/asn1/test/asn1_test_lib.erl
index 26cbdeb940..70e78c5197 100644
--- a/lib/asn1/test/asn1_test_lib.erl
+++ b/lib/asn1/test/asn1_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,11 +19,23 @@
%%
-module(asn1_test_lib).
+-export([compile/3]).
+-export([compile_all/3]).
+
-export([ticket_7407_compile/2,ticket_7407_code/1, ticket_7678/2,
- ticket_7708/2, ticket_7763/1, ticket_7876/3]).
+ ticket_7708/2, ticket_7763/1, ticket_7876/3]).
-include_lib("test_server/include/test_server.hrl").
+compile(File, Config, Options) -> compile_all([File], Config, Options).
+
+compile_all(Files, Config, Options) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ % TODO: Purge and load as well?
+ [ok = asn1ct:compile(filename:join(DataDir, F),
+ [{outdir, CaseDir}|Options]) || F <- Files],
+ ok.
ticket_7407_compile(Config,Option) ->
diff --git a/lib/asn1/test/ber_decode_error.erl b/lib/asn1/test/ber_decode_error.erl
index a566e0b07f..ff6e386a88 100644
--- a/lib/asn1/test/ber_decode_error.erl
+++ b/lib/asn1/test/ber_decode_error.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(ber_decode_error).
--export([run/1, compile/3]).
+-export([run/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Constructed",
- [Rules,{outdir,OutDir}]++Options).
-
-
run([]) ->
?line {ok,B} = asn1_wrapper:encode('Constructed','S3',{'S3',17}),
?line [T,L|V] = lists:flatten(B),
diff --git a/lib/asn1/test/h323test.erl b/lib/asn1/test/h323test.erl
index 5545dd45b9..c23ea27003 100644
--- a/lib/asn1/test/h323test.erl
+++ b/lib/asn1/test/h323test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,17 +20,9 @@
-module(h323test).
-compile(export_all).
--export([compile/3,run/1]).
+-export([run/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "H235-SECURITY-MESSAGES",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "H323-MESSAGES",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "MULTIMEDIA-SYSTEM-CONTROL",[Rules,{outdir,OutDir}]++Options).
-
run(per_bin) ->
run();
run(per) ->
diff --git a/lib/asn1/test/testChoExtension.erl b/lib/asn1/test/testChoExtension.erl
index 5e149ed247..b75cfb6831 100644
--- a/lib/asn1/test/testChoExtension.erl
+++ b/lib/asn1/test/testChoExtension.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,11 @@
%%
-module(testChoExtension).
--export([compile/3]).
-export([extension/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoExtension",[Rules,{outdir,OutDir}] ++ Options).
-
-
-
extension(_Rules) ->
?line {ok,Bytes1} = asn1_wrapper:encode('ChoExtension','ChoExt1',{'ChoExt1',{bool,true}}),
diff --git a/lib/asn1/test/testChoExternal.erl b/lib/asn1/test/testChoExternal.erl
index b6586b616b..b2d171f9c7 100644
--- a/lib/asn1/test/testChoExternal.erl
+++ b/lib/asn1/test/testChoExternal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,12 +28,12 @@
-compile(Config,Rules,Optimize) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoExternal",[Rules,{outdir,OutDir}]++Optimize).
+compile(Config, Rules, Optimize) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ true = code:add_patha(CaseDir),
+ ok = asn1ct:compile(DataDir ++ "ChoExternal",
+ [Rules, {outdir, CaseDir}] ++ Optimize).
diff --git a/lib/asn1/test/testChoPrim.erl b/lib/asn1/test/testChoPrim.erl
index f037db1c5d..936a38f76c 100644
--- a/lib/asn1/test/testChoPrim.erl
+++ b/lib/asn1/test/testChoPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,22 +19,11 @@
%%
-module(testChoPrim).
--export([compile/3]).
-export([bool/1]).
-export([int/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ChoPrim",[Rules,{outdir,OutDir}]++Options).
-
-
-
bool(Rules) ->
?line {ok,Bytes11} = asn1_wrapper:encode('ChoPrim','ChoCon',{bool0,true}),
diff --git a/lib/asn1/test/testCompactBitString.erl b/lib/asn1/test/testCompactBitString.erl
index cd5586602b..15818eaf5c 100644
--- a/lib/asn1/test/testCompactBitString.erl
+++ b/lib/asn1/test/testCompactBitString.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,29 +19,19 @@
%%
-module(testCompactBitString).
--export([compile/3]).
+-export([compile/2]).
-export([compact_bit_string/1, bit_string_unnamed/1,otp_4869/1,
ticket_7734/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Option) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "PrimStrings",
- [Rules,{outdir,OutDir}]++Option),
- case Rules of
- per_bin ->
- ?line ok = asn1ct:compile(DataDir ++ "Constraints",
- [Rules,{outdir,OutDir}]++Option);
- _ -> ok
+compile(Config, Options) ->
+ asn1_test_lib:compile("PrimStrings", Config, Options),
+ case lists:member(per_bin, Options) of
+ true -> asn1_test_lib:compile("Constraints", Config, Options);
+ _ -> ok
end.
-
-
compact_bit_string(Rules) ->
%%==========================================================
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl
index dcbc04f8d8..cb15a24359 100644
--- a/lib/asn1/test/testConstraints.erl
+++ b/lib/asn1/test/testConstraints.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,24 +19,11 @@
%%
-module(testConstraints).
--export([compile/3]).
-export([int_constraints/1,refed_NNL_name/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Constraints",[Rules,{outdir,OutDir}]++Options).
-
-
-
-
int_constraints(Rules) ->
%%==========================================================
diff --git a/lib/asn1/test/testContextSwitchingTypes.erl b/lib/asn1/test/testContextSwitchingTypes.erl
index 66c1e831c3..4f67942922 100644
--- a/lib/asn1/test/testContextSwitchingTypes.erl
+++ b/lib/asn1/test/testContextSwitchingTypes.erl
@@ -19,21 +19,10 @@
%%
-module(testContextSwitchingTypes).
--export([compile/3]).
-export([test/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ContextSwitchingTypes",
- [Rules,{outdir,OutDir}]++Options).
-
-
test(Config) ->
?line ValT = 'ContextSwitchingTypes':'val1-T'(),
?line {ok,Bytes1} =
@@ -42,7 +31,7 @@ test(Config) ->
asn1_wrapper:decode('ContextSwitchingTypes','T',Bytes1),
?line ok = check_EXTERNAL(Result1),
?line {ok,ValT2} = asn1ct:value('ContextSwitchingTypes','T',
- [{i, ?config(priv_dir, Config)}]),
+ [{i, ?config(case_dir, Config)}]),
?line {ok,Bytes1_2} =
asn1_wrapper:encode('ContextSwitchingTypes','T',ValT2),
?line {ok,Result1_2} =
diff --git a/lib/asn1/test/testDER.erl b/lib/asn1/test/testDER.erl
index 630f7ecc14..395116bd34 100644
--- a/lib/asn1/test/testDER.erl
+++ b/lib/asn1/test/testDER.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(testDER).
--export([compile/3]).
-export([test/0]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "DERSpec",
- [Rule,der,{outdir,OutDir}]++Options).
-
test() ->
Val = {'Set',12,{version,214},true},
?line {ok,Bin}=asn1_wrapper:encode('DERSpec','Set',Val),
diff --git a/lib/asn1/test/testDeepTConstr.erl b/lib/asn1/test/testDeepTConstr.erl
index 53d2b3040e..aa3afbb58f 100644
--- a/lib/asn1/test/testDeepTConstr.erl
+++ b/lib/asn1/test/testDeepTConstr.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,23 +21,10 @@
-module(testDeepTConstr).
--export([compile/3,main/1]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "TConstrChoice",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++
- "TConstr",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Erule) ->
Val1 = {'FilterItem',
{substrings,
diff --git a/lib/asn1/test/testDoubleEllipses.erl b/lib/asn1/test/testDoubleEllipses.erl
index 20be4ea215..9030a99ce2 100644
--- a/lib/asn1/test/testDoubleEllipses.erl
+++ b/lib/asn1/test/testDoubleEllipses.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testDoubleEllipses).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -34,17 +33,6 @@
-record('SetAlt',{a,d,b,e,c,f,g}).
-record('SetAltV2',{a,d,b,e,h,i,c,f,g}).
-
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "DoubleEllipses",[Rules,{outdir,OutDir}]++Options).
-
-
main(_Rules) ->
%% SEQUENCE
?line {ok,Bytes} =
diff --git a/lib/asn1/test/testEnumExt.erl b/lib/asn1/test/testEnumExt.erl
index 4ea0f3b8a1..c97116413a 100644
--- a/lib/asn1/test/testEnumExt.erl
+++ b/lib/asn1/test/testEnumExt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(testEnumExt).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "EnumExt",[Rules,{outdir,OutDir}]++Options).
-
-
main(Rules) when Rules == per; Rules == per_bin; Rules == uper_bin ->
io:format("main(~p)~n",[Rules]),
B32=[32],B64=[64],
diff --git a/lib/asn1/test/testExternal.erl b/lib/asn1/test/testExternal.erl
deleted file mode 100644
index 6e1fa0ee7d..0000000000
--- a/lib/asn1/test/testExternal.erl
+++ /dev/null
@@ -1,35 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
--module(testExternal).
-
--export([compile/3]).
-
--include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line test_server:format("Rules ~p~n",[Rules]),
- ?line ok = asn1ct:compile(DataDir ++ "External",[Rules,{outdir,OutDir}]++Options).
-
-
diff --git a/lib/asn1/test/testINSTANCE_OF.erl b/lib/asn1/test/testINSTANCE_OF.erl
index 6ae656da44..5986a00ec5 100644
--- a/lib/asn1/test/testINSTANCE_OF.erl
+++ b/lib/asn1/test/testINSTANCE_OF.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,10 @@
%%
-module(testINSTANCE_OF).
--export([compile/3,main/1]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "INSTANCEOF.asn1",
- [Rules,{outdir,OutDir}]++Opt).
-
-
main(Erule) ->
?line {ok,Integer} = asn1_wrapper:encode('INSTANCEOF','Int',3),
diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl
index 9d73be9f23..03e70c730a 100644
--- a/lib/asn1/test/testInfObj.erl
+++ b/lib/asn1/test/testInfObj.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
-module(testInfObj).
--export([compile/3,main/1,compile_RANAPfiles/3]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,42 +28,6 @@
-record('InitiatingMessage2',{procedureCode,criticality,value}).
-record('Iu-ReleaseCommand',{first,second}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "RANAPextract1",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "InfObj",[Rules,{outdir,OutDir}]++Options),
- %% test case for OTP-4792 optional open type
- ?line ok = asn1ct:compile(DataDir ++ "MAP-ExtensionDataTypes",[Rules,{outdir,OutDir}]++Options),
- %% OTP-6707
- ?line ok = asn1ct:compile(DataDir ++ "Objects",[Rules,{outdir,OutDir}]++Options),
- %% OTP-6717
- ?line ok = asn1ct:compile(DataDir ++ "INAPv2extract",[Rules,{outdir,OutDir}]++Options).
-
-
-compile_RANAPfiles(Config,Rules,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-CommonDataTypes",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-Constants",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-Containers",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-IEs",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-PDU-Contents",
- [Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "RANAP-PDU-Descriptions",
- [Rules,{outdir,OutDir}]++Options).
-
-
main(_Erule) ->
Val1 = #'InitiatingMessage'{procedureCode=1,
criticality=ignore,
diff --git a/lib/asn1/test/testInfObjectClass.erl b/lib/asn1/test/testInfObjectClass.erl
index 07ebb7dbd0..e639066246 100644
--- a/lib/asn1/test/testInfObjectClass.erl
+++ b/lib/asn1/test/testInfObjectClass.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,22 +21,10 @@
-module(testInfObjectClass).
--export([compile/3,main/1]).
+-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ErrorClass",[Rules,{outdir,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "InfClass",[Rules,{outdir,OutDir}]++Options).
-
-
main(Rule) ->
%% this test is added for OTP-4591, to test that elements in decoded
%% value has terms in right order.
diff --git a/lib/asn1/test/testMegaco.erl b/lib/asn1/test/testMegaco.erl
index 8413d00c25..f4edcebb7e 100644
--- a/lib/asn1/test/testMegaco.erl
+++ b/lib/asn1/test/testMegaco.erl
@@ -108,26 +108,17 @@ compile(_Config,ber,[optimize]) ->
compile(_Config,per,[optimize]) ->
{ok,no_module,no_module};
compile(Config,Erule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "MEDIA-GATEWAY-CONTROL.asn",
- [Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(DataDir ++
- "OLD-MEDIA-GATEWAY-CONTROL.asn",
- [Erule,{outdir,OutDir}]++Options),
+ asn1_test_lib:compile("MEDIA-GATEWAY-CONTROL.asn", Config, [Erule|Options]),
+ asn1_test_lib:compile("OLD-MEDIA-GATEWAY-CONTROL.asn", Config, [Erule|Options]),
{ok,'OLD-MEDIA-GATEWAY-CONTROL','MEDIA-GATEWAY-CONTROL'}.
main(no_module,_) -> ok;
main('OLD-MEDIA-GATEWAY-CONTROL',Config) ->
% Msg = msg11(),
- OutDir = ?config(priv_dir, Config),
+ CaseDir = ?config(case_dir, Config),
{ok,Msg} = asn1ct:value('OLD-MEDIA-GATEWAY-CONTROL','MegacoMessage',
- [{i, OutDir}]),
+ [{i, CaseDir}]),
?line {ok,Bytes} = asn1_wrapper:encode('OLD-MEDIA-GATEWAY-CONTROL',
'MegacoMessage',Msg),
?line {ok,Msg} = asn1_wrapper:decode('OLD-MEDIA-GATEWAY-CONTROL',
@@ -178,7 +169,7 @@ request(Mid, TransId, ContextId, CmdReq) when is_list(CmdReq) ->
msg11() ->
TimeStamp = #'TimeNotation'{date = "19990729",
- time = "22010001"},
+ time = "22012001"},
Parm = #'EventParameter'{eventParameterName = "ds",
value = "916135551212"},
diff --git a/lib/asn1/test/testMergeCompile.erl b/lib/asn1/test/testMergeCompile.erl
index 733cbc0eef..31aa3518f6 100644
--- a/lib/asn1/test/testMergeCompile.erl
+++ b/lib/asn1/test/testMergeCompile.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,31 +20,13 @@
-module(testMergeCompile).
--export([compile/3,main/1,mvrasn/1]).
+-export([main/1,mvrasn/1]).
-include_lib("test_server/include/test_server.hrl").
-record('InitiatingMessage',{procedureCode,criticality,value}).
-record('Iu-ReleaseCommand',{protocolIEs,protocolExtensions}).
-compile(Config,Erule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "MS.set.asn",[Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(DataDir ++
- "RANAPSET.set.asn1",[Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(filename:join([DataDir,"Mvrasn4.set.asn"]),
- [Erule,{outdir,OutDir}]++Options),
-
- ?line ok = asn1ct:compile(filename:join([DataDir,"Mvrasn6.set.asn"]),
- [Erule,{outdir,OutDir}]++Options).
-
-
main(Erule) ->
%% test of module MS.set.asn that tests OTP-4492: different tagdefault in
%% modules and types with same name in modules
diff --git a/lib/asn1/test/testMvrasn6.erl b/lib/asn1/test/testMvrasn6.erl
deleted file mode 100644
index eaa667e6d7..0000000000
--- a/lib/asn1/test/testMvrasn6.erl
+++ /dev/null
@@ -1,44 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
--module(testMvrasn6).
-
--export([compile/2]).
--export([main/0]).
-
--include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line Options = [Rules,{outdir,OutDir}],
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-21-4",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-20-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-19-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-15-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-18-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-14-6",Options),
- ?line ok = asn1ct:compile(DataDir ++ "Mvrasn-11-6",Options).
-
-
-main() ->
- ok.
-
diff --git a/lib/asn1/test/testNBAPsystem.erl b/lib/asn1/test/testNBAPsystem.erl
index 1269f94060..4e8381e51e 100644
--- a/lib/asn1/test/testNBAPsystem.erl
+++ b/lib/asn1/test/testNBAPsystem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,7 @@
%%
-module(testNBAPsystem).
--export([compile/3,test/2,cell_setup_req_msg/0]).
+-export([compile/2,test/2,cell_setup_req_msg/0]).
-include_lib("test_server/include/test_server.hrl").
@@ -78,19 +78,15 @@ powerRaiseLimit, dLPowerAveragingWindowSize, 'iE-Extensions' = asn1_NOVALUE}).
id, criticality, extensionValue}).
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line DataDir2 = filename:join([DataDir,nbapsystem]),
-
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-CommonDataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-IEs.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-PDU-Contents.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-PDU-Discriptions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-Constants.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"NBAP-Containers.asn"]),[Rules,{outdir,OutDir}]++Opt).
+compile(Config, Options) ->
+ [asn1_test_lib:compile(filename:join([nbapsystem, M]), Config, Options)
+ || M <- ["NBAP-CommonDataTypes.asn",
+ "NBAP-IEs.asn",
+ "NBAP-PDU-Contents.asn",
+ "NBAP-PDU-Discriptions.asn",
+ "NBAP-Constants.asn",
+ "NBAP-Containers.asn"]],
+ ok.
test(_Erule,Config) ->
@@ -291,13 +287,7 @@ protocolIEs_051107() ->
criticality = ignore,
extensionValue = 'hsdpa-non-capable'}.
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-compare(V,V) ->
+compare(V,V) ->
ok;
compare(V,L) when is_list(L) ->
compare(V,list_to_binary(L));
@@ -306,52 +296,7 @@ compare(_,_) ->
check_record_names(Msg,Config) ->
DataDir = ?config(data_dir,Config),
- OutDir = ?config(priv_dir,Config),
- io:format("check_record_names: compiling ~p~ninclude directory: ~p~n",
- [filename:join([DataDir,"test_records"]),OutDir]),
- ?line {ok,test_records} = compile:file(filename:join([DataDir,"test_records"]),
- [{i,OutDir}]),
- io:format("check_record_names: calling test_records:'check_record_names_OTP-5812'/1~n",[]),
- ?line ok = test_records:'check_record_names_OTP-5812'(Msg).
-
-% check_record_names({initiatingMessage,
-% #'InitiatingMessage'{procedureID = ProcedureID,
-% criticality = _Criticality,
-% messageDiscriminator = _MessageDisc,
-% transactionID = _TransactionID,
-% value = Value}}) ->
-
-% ?line ok = check_record_ProcedureID(ProcedureID),
-% ?line ok = check_record_Value(Value).
-
-% check_record_ProcedureID(#'ProcedureID'{}) ->
-% ok;
-% check_record_ProcedureID(_) -> false.
-
-% check_record_Value(#'ResourceStatusIndication'{protocolIEs = ProtocolIEs}) ->
-% ?line ok = check_record_ProtocolIEs(ProtocolIEs);
-% check_record_Value(_) -> false.
-
-% check_record_ProtocolIEs(#'ProtocolIE-Field'{value =IndicationType}) ->
-% ?line ok = check_record_NFResourceStatusInd(IndicationType);
-% check_record_ProtocolIEs(_) -> false.
-
-% check_record_NFResourceStatusInd({'no-Failure',#'No-Failure-ResourceStatusInd'{'local-Cell-InformationList'=[LCI]}}) ->
-% ?line ok = check_record_LCInfoResourceStatusInd(LCI);
-% check_record_NFResourceStatusInd(_) -> false.
-
-% check_record_LCInfoResourceStatusInd(#'Local-Cell-InformationItem-ResourceStatusInd'{commonChannelsCapacityConsumptionLaw=[CCCCL],dedicatedChannelsCapacityConsumptionLaw=[DCCCL],'iE-Extensions' = [LCIRE]}) ->
-% ?line ok = check_record_CCCCL(CCCCL),
-% ?line ok = check_record_DCCCL(DCCCL),
-% ?line ok = check_record_LCIRE(LCIRE).
-
-% check_record_CCCCL(#'CommonChannelsCapacityConsumptionLaw_SEQOF'{}) ->
-% ok;
-% check_record_CCCCL(_) -> false.
-
-% check_record_DCCCL(#'DedicatedChannelsCapacityConsumptionLaw_SEQOF'{}) ->
-% ok;
-% check_record_DCCCL(_) -> false.
-% check_record_LCIRE(#'ProtocolExtensionField'{}) ->
-% ok;
-% check_record_LCIRE(_) -> false.
+ CaseDir = ?config(case_dir,Config),
+ {ok, test_records} = compile:file(filename:join([DataDir, "test_records"]),
+ [{i, CaseDir}]),
+ ok = test_records:'check_record_names_OTP-5812'(Msg).
diff --git a/lib/asn1/test/testOpenTypeImplicitTag.erl b/lib/asn1/test/testOpenTypeImplicitTag.erl
index 8662744ed3..a37d8004ef 100644
--- a/lib/asn1/test/testOpenTypeImplicitTag.erl
+++ b/lib/asn1/test/testOpenTypeImplicitTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,10 @@
%%
-module(testOpenTypeImplicitTag).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "OpenTypeImplicitTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes1} =
diff --git a/lib/asn1/test/testParamBasic.erl b/lib/asn1/test/testParamBasic.erl
index 4ba0029b54..507aa07112 100644
--- a/lib/asn1/test/testParamBasic.erl
+++ b/lib/asn1/test/testParamBasic.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testParamBasic).
-export([compile/3]).
--export([compile_der/2]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -39,13 +38,6 @@ compile(Config,Rules,Options) ->
?line ok = asn1ct:compile(DataDir ++ "ParamBasic",
[Rules,{outdir,OutDir}]++Options).
-compile_der(Config,Rules) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "ParamBasic",
- [der,Rules,{outdir,OutDir}]).
-
main(Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testParameterizedInfObj.erl b/lib/asn1/test/testParameterizedInfObj.erl
index b95d627d58..68faf08a61 100644
--- a/lib/asn1/test/testParameterizedInfObj.erl
+++ b/lib/asn1/test/testParameterizedInfObj.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
-module(testParameterizedInfObj).
--export([compile/3,main/1,ranap/1]).
+-export([main/1,ranap/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,16 +31,6 @@
-record('Iu-ReleaseCommand',{protocolIEs,protocolExtensions}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "Param",[Rules,{outdir,OutDir}]++Options).
-% ?line ok = asn1ct:compile(DataDir ++ "RANAP-CommonDataTypes",[Rules,{outdir,OutDir}]++Options).
-
-
main(Erule) ->
PERVal = #'AllocationOrRetentionPriority'
{priorityLevel = true,
diff --git a/lib/asn1/test/testPrim.erl b/lib/asn1/test/testPrim.erl
index 39c1e4d1d8..0d4427ba69 100644
--- a/lib/asn1/test/testPrim.erl
+++ b/lib/asn1/test/testPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testPrim).
--export([compile/3]).
-export([bool/1]).
-export([int/1]).
-export([enum/1]).
@@ -30,18 +29,6 @@
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Prim",
- [Rules,{outdir,OutDir}] ++ Opt),
- ?line ok = asn1ct:compile(DataDir ++ "Real",
- [Rules,{outdir,OutDir}] ++ Opt).
-
bool(Rules) ->
%%==========================================================
diff --git a/lib/asn1/test/testPrimExternal.erl b/lib/asn1/test/testPrimExternal.erl
index 23633177eb..65c3c3a31a 100644
--- a/lib/asn1/test/testPrimExternal.erl
+++ b/lib/asn1/test/testPrimExternal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,21 +19,10 @@
%%
-module(testPrimExternal).
--export([compile/3]).
-export([external/1]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "PrimExternal",[Rules,{outdir,OutDir}]++Options).
-
-
-
external(_Rules) ->
diff --git a/lib/asn1/test/testRANAP.erl b/lib/asn1/test/testRANAP.erl
index 52a58d850b..7c1a02adf1 100644
--- a/lib/asn1/test/testRANAP.erl
+++ b/lib/asn1/test/testRANAP.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,18 +20,16 @@
-module(testRANAP).
--export([compile/3,testobj/1]).
+-export([compile/2,testobj/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Erule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(filename:join(DataDir,"RANAP"),[Erule,{outdir,OutDir}]++Options),
- ?line {ok,testobj} = compile:file(filename:join(DataDir,"testobj"),[{i,OutDir},{outdir,OutDir}]++Options),
+compile(Config, Options) ->
+ asn1_test_lib:compile("RANAP", Config, Options),
+ DataDir = ?config(data_dir,Config),
+ CaseDir = ?config(case_dir,Config),
+ {ok,testobj} = compile:file(filename:join(DataDir,"testobj"),[{i,CaseDir},{outdir,CaseDir}]++Options),
ok.
testobj(_Erule) ->
diff --git a/lib/asn1/test/testROSE.erl b/lib/asn1/test/testROSE.erl
deleted file mode 100644
index a692ec7682..0000000000
--- a/lib/asn1/test/testROSE.erl
+++ /dev/null
@@ -1,36 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
--module(testROSE).
-
--export([compile/3]).
-
--include_lib("test_server/include/test_server.hrl").
-
-
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Merged.set.asn1",
- [Rules,{outdir,OutDir}]++Opt).
-
diff --git a/lib/asn1/test/testSSLspecs.erl b/lib/asn1/test/testSSLspecs.erl
index 10623af51e..51ef134e5f 100644
--- a/lib/asn1/test/testSSLspecs.erl
+++ b/lib/asn1/test/testSSLspecs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,58 +20,37 @@
-module(testSSLspecs).
--export([compile/3,run/1,compile_inline/2,run_inline/1]).
+-export([compile/2,run/1,compile_inline/2,run_inline/1]).
-include_lib("test_server/include/test_server.hrl").
+compile(Config, Options) ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ NewOptions = [{i, DataDir}, {i, CaseDir}|Options],
-compile(Config,Rules,Options) ->
+ asn1_test_lib:compile_all(["SSL-PKIX", "PKIXAttributeCertificate"],
+ Config, NewOptions),
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++
- "SSL-PKIX",[Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIXAttributeCertificate",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
%% test case for OTP-4792 optional open type
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Algorithms88",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Explicit88",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Implicit88",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
+ asn1_test_lib:compile_all(["PKIX1Algorithms88", "PKIX1Explicit88",
+ "PKIX1Implicit88"],
+ Config, NewOptions),
+
%% OTP-6698, OTP-6702
- ?line ok = remove_db_files(OutDir),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Explicit93",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options),
- ?line ok = asn1ct:compile(DataDir ++ "PKIX1Implicit93",
- [Rules,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options).
-
-compile_inline(Config,Rule) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- case Rule of
- BER when BER==ber_bin;BER==ber_bin_v2 ->
- Options = [der,compact_bit_string,optimize,
- asn1config,inline],
- ?line ok = remove_db_file_inline(OutDir),
- ?line ok = asn1ct:compile(DataDir ++ "OTP-PKIX.set.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- {i,OutDir}]++Options);
- _ ->
- ok
- end.
+ ok = remove_db_files(CaseDir),
+ asn1_test_lib:compile_all(["PKIX1Explicit93", "PKIX1Implicit93"],
+ Config, NewOptions).
+
+compile_inline(Config, Rule) when Rule == ber_bin; Rule == ber_bin_v2 ->
+ DataDir = ?config(data_dir, Config),
+ CaseDir = ?config(case_dir, Config),
+ Options = [{i, CaseDir}, {i, DataDir}, Rule,
+ der, compact_bit_string, optimize, asn1config, inline],
+ ok = remove_db_file_inline(CaseDir),
+ asn1_test_lib:compile("OTP-PKIX.set.asn", Config, Options);
+compile_inline(_Config, _Rule) ->
+ ok.
remove_db_files(Dir) ->
?line ok = remove_db_file(Dir ++ "PKIX1Explicit93.asn1db"),
diff --git a/lib/asn1/test/testSelectionTypes.erl b/lib/asn1/test/testSelectionTypes.erl
index 893c31622f..6d1641388f 100644
--- a/lib/asn1/test/testSelectionTypes.erl
+++ b/lib/asn1/test/testSelectionTypes.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,19 +19,10 @@
%%
-module(testSelectionTypes).
--export([compile/3]).
-export([test/0]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rule,Options) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SelectionType",
- [Rule,{outdir,OutDir}]++Options).
-
test() ->
Val = ["PrintableString","PrintableString","PrintableString"],
?line {ok,Bin}=asn1_wrapper:encode('SelectionType','MendeleyevTable',Val),
diff --git a/lib/asn1/test/testSeq2738.erl b/lib/asn1/test/testSeq2738.erl
index 9cf9c8fcb4..cddfe4b311 100644
--- a/lib/asn1/test/testSeq2738.erl
+++ b/lib/asn1/test/testSeq2738.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeq2738).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -32,14 +31,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Seq2738",[Rules,{outdir,OutDir}]++Options).
-
-
main(_Rules) ->
?line {ok,Bytes} =
diff --git a/lib/asn1/test/testSeqDefault.erl b/lib/asn1/test/testSeqDefault.erl
index edf07cf1c1..a772b749bd 100644
--- a/lib/asn1/test/testSeqDefault.erl
+++ b/lib/asn1/test/testSeqDefault.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSeqDefault).
-include("External.hrl").
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -37,15 +36,6 @@
-record('SeqIn',{boolIn, intIn}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqDefault",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqExtension.erl b/lib/asn1/test/testSeqExtension.erl
index 538e2c250b..7c77ab87e9 100644
--- a/lib/asn1/test/testSeqExtension.erl
+++ b/lib/asn1/test/testSeqExtension.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSeqExtension).
-include("External.hrl").
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,16 +30,6 @@
-record('SeqExt4',{bool, int}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqExtension",
- [Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSeqIndefinite.erl b/lib/asn1/test/testSeqIndefinite.erl
index 9285d7b368..25742474bb 100644
--- a/lib/asn1/test/testSeqIndefinite.erl
+++ b/lib/asn1/test/testSeqIndefinite.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,20 +19,11 @@
%%
-module(testSeqIndefinite).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqSetIndefinite",
- [Rules,{outdir,OutDir}]++Options).
-
main(per_bin) -> ok;
main(per) -> ok;
main(ber_bin_v2) ->
diff --git a/lib/asn1/test/testSeqSetDefaultVal.erl b/lib/asn1/test/testSeqSetDefaultVal.erl
index 5a1a443ebc..ab484db5f2 100644
--- a/lib/asn1/test/testSeqSetDefaultVal.erl
+++ b/lib/asn1/test/testSeqSetDefaultVal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSeqSetDefaultVal).
-include("External.hrl").
--export([compile/2]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -95,14 +94,6 @@
-record('S4_b',{ba = asn1_DEFAULT,
bb = asn1_DEFAULT}).
-
-compile(Config,Rules) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "Default",
- [Rules,der,{outdir,OutDir}]).
-
main(_Rules) ->
?line {ok,[48,0]} =
diff --git a/lib/asn1/test/testSeqTag.erl b/lib/asn1/test/testSeqTag.erl
index 60d3629840..9fdaae35dd 100644
--- a/lib/asn1/test/testSeqTag.erl
+++ b/lib/asn1/test/testSeqTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqTag).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -35,16 +34,6 @@
-record('Imp',{os, bool}).
-record('Exp',{os, bool}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSeqTypeRefSeq.erl b/lib/asn1/test/testSeqTypeRefSeq.erl
index 51b0f13c57..57ec6c19b1 100644
--- a/lib/asn1/test/testSeqTypeRefSeq.erl
+++ b/lib/asn1/test/testSeqTypeRefSeq.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqTypeRefSeq).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -46,15 +45,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefSeq",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSeqTypeRefSet.erl b/lib/asn1/test/testSeqTypeRefSet.erl
index a704ce3403..c06a0e7a2b 100644
--- a/lib/asn1/test/testSeqTypeRefSet.erl
+++ b/lib/asn1/test/testSeqTypeRefSet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSeqTypeRefSet).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,15 +30,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefSet",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes41} =
diff --git a/lib/asn1/test/testSetDefault.erl b/lib/asn1/test/testSetDefault.erl
index e36894327c..8aa205e0f0 100644
--- a/lib/asn1/test/testSetDefault.erl
+++ b/lib/asn1/test/testSetDefault.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetDefault).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -30,16 +29,6 @@
-record('SetIn',{boolIn, intIn}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetDefault",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetIndefinite.erl b/lib/asn1/test/testSetIndefinite.erl
index bf8b242860..d8e2b6a9cf 100644
--- a/lib/asn1/test/testSetIndefinite.erl
+++ b/lib/asn1/test/testSetIndefinite.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,20 +19,11 @@
%%
-module(testSetIndefinite).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqSetIndefinite",
- [Rules,{outdir,OutDir}]++Options).
-
main(per_bin) -> ok;
main(per) -> ok;
main(ber_bin_v2) ->
diff --git a/lib/asn1/test/testSetOf.erl b/lib/asn1/test/testSetOf.erl
index 0769b9a344..08723fb468 100644
--- a/lib/asn1/test/testSetOf.erl
+++ b/lib/asn1/test/testSetOf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetOf).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -37,15 +36,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOf",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetOfCho.erl b/lib/asn1/test/testSetOfCho.erl
index 474742fbdb..c89bf9596e 100644
--- a/lib/asn1/test/testSetOfCho.erl
+++ b/lib/asn1/test/testSetOfCho.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetOfCho).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -33,15 +32,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOfCho",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetOfExternal.erl b/lib/asn1/test/testSetOfExternal.erl
index 9e2b01c698..6b280a2595 100644
--- a/lib/asn1/test/testSetOfExternal.erl
+++ b/lib/asn1/test/testSetOfExternal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSetOfExternal).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -32,15 +31,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOfExternal",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetOfTag.erl b/lib/asn1/test/testSetOfTag.erl
index c101306d7a..2c7a2f5473 100644
--- a/lib/asn1/test/testSetOfTag.erl
+++ b/lib/asn1/test/testSetOfTag.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,6 @@
-module(testSetOfTag).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -47,15 +46,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetOfTag",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes11} =
diff --git a/lib/asn1/test/testSetTypeRefCho.erl b/lib/asn1/test/testSetTypeRefCho.erl
index 1f68a8fbc4..a0989926c7 100644
--- a/lib/asn1/test/testSetTypeRefCho.erl
+++ b/lib/asn1/test/testSetTypeRefCho.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefCho).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,15 +27,6 @@
-record('SetTRcho',{setCho, setChoE, 'setCho-E', 'setChoE-E'}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefCho",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSetTypeRefPrim.erl b/lib/asn1/test/testSetTypeRefPrim.erl
index e6cec260e5..9c7fbd803e 100644
--- a/lib/asn1/test/testSetTypeRefPrim.erl
+++ b/lib/asn1/test/testSetTypeRefPrim.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefPrim).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -27,15 +26,6 @@
-record('SetTR',{octStr, octStrI, octStrE, 'octStr-I', 'octStrI-I', 'octStrE-I', 'octStr-E', 'octStrI-E', 'octStrE-E'}).
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefPrim",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testSetTypeRefSeq.erl b/lib/asn1/test/testSetTypeRefSeq.erl
index 0c1c9400bf..a3ef4b188d 100644
--- a/lib/asn1/test/testSetTypeRefSeq.erl
+++ b/lib/asn1/test/testSetTypeRefSeq.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefSeq).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,15 +30,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefSeq",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
?line {ok,Bytes41} =
diff --git a/lib/asn1/test/testSetTypeRefSet.erl b/lib/asn1/test/testSetTypeRefSet.erl
index 6544e77458..ce77316ef8 100644
--- a/lib/asn1/test/testSetTypeRefSet.erl
+++ b/lib/asn1/test/testSetTypeRefSet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,6 @@
%%
-module(testSetTypeRefSet).
--export([compile/3]).
-export([main/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -46,15 +45,6 @@
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SetTypeRefSet",[Rules,{outdir,OutDir}]++Options).
-
-
-
main(_Rules) ->
diff --git a/lib/asn1/test/testTCAP.erl b/lib/asn1/test/testTCAP.erl
index 5e29938a16..f4e80ecd3b 100644
--- a/lib/asn1/test/testTCAP.erl
+++ b/lib/asn1/test/testTCAP.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,33 +19,22 @@
%%
-module(testTCAP).
--export([compile/3,test/2,compile_asn1config/3,test_asn1config/0]).
+-export([compile/2,test/2,compile_asn1config/2,test_asn1config/0]).
-include_lib("test_server/include/test_server.hrl").
+compile(Config, Options) ->
+ Files = ["Remote-Operations-Information-Objects",
+ "TCAPMessages",
+ "TCAPMessages-simple",
+ "TCAPPackage"],
+ asn1_test_lib:compile_all(Files, Config, Options),
+ DataDir = ?config(data_dir,Config),
+ CaseDir = ?config(case_dir,Config),
+ compile:file(filename:join([DataDir,"TCAPPackage_msg"]),[{i,CaseDir},{outdir,CaseDir}]).
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Information-Objects",[Rules,{outdir,OutDir}]++Opt),
-% ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Generic-ROS-PDUs",[Rules,{outdir,OutDir}]++Opt),
-% ?line ok = asn1ct:compile(DataDir ++ "Remote-Operations-Useful-Definitions",[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "TCAPMessages",[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "TCAPMessages-simple",[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "TCAPPackage",[Rules,{outdir,OutDir}]++Opt),
- ?line compile:file(filename:join([DataDir,"TCAPPackage_msg"]),[{i,OutDir},{outdir,OutDir}]).
-
-compile_asn1config(Config,Rules,Opt) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "TCAPPackage",
- [Rules,{outdir,OutDir},{i,DataDir}]++Opt).
+compile_asn1config(Config, Options) ->
+ asn1_test_lib:compile("TCAPPackage", Config, Options).
test(Erule,_Config) when Erule==ber;Erule==ber_bin;Erule==ber_bin_v2 ->
% ?line OutDir = ?config(priv_dir,Config),
diff --git a/lib/asn1/test/testTcapsystem.erl b/lib/asn1/test/testTcapsystem.erl
index 2f13c11cd4..4979a385b2 100644
--- a/lib/asn1/test/testTcapsystem.erl
+++ b/lib/asn1/test/testTcapsystem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,54 +19,46 @@
%%
-module(testTcapsystem).
--export([compile/3]).
+-export([compile/2]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line DataDir2 = filename:join([DataDir,tcapsystem]),
-
- ?line ok = asn1ct:compile(filename:join([DataDir2,"DialoguePDUs.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ApplicationContexts.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-BS-Code.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-CallHandlingOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-CH-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-CommonDataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-DialogueInformation.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ER-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-Errors.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ExtensionDataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-GR-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-Group-Call-Operations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-LCS-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-LocationServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-MobileServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-MS-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-OM-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-OperationAndMaintenanceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-Protocol.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SecureTransportOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ShortMessageServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SM-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SS-Code.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SS-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-ST-DataTypes.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-SupplementaryServiceOperations.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MAP-TS-Code.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"MobileDomainDefinitions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"Remote-Operations-Generic-ROS-PDUs.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"Remote-Operations-Information-Objects.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"Remote-Operations-Useful-Definitions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TCAP-Examples.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TCAPMessages.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TCAP-Tools.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"TC-Notation-Extensions.asn"]),[Rules,{outdir,OutDir}]++Opt),
- ?line ok = asn1ct:compile(filename:join([DataDir2,"UnidialoguePDUs.asn"]),[Rules,{outdir,OutDir}]++Opt).
-
-
+compile(Config, Options) ->
+ [asn1_test_lib:compile(filename:join([tcapsystem, M]), Config, Options)
+ || M <- ["DialoguePDUs.asn",
+ "MAP-ApplicationContexts.asn",
+ "MAP-BS-Code.asn",
+ "MAP-CallHandlingOperations.asn",
+ "MAP-CH-DataTypes.asn",
+ "MAP-CommonDataTypes.asn",
+ "MAP-DialogueInformation.asn",
+ "MAP-ER-DataTypes.asn",
+ "MAP-Errors.asn",
+ "MAP-ExtensionDataTypes.asn",
+ "MAP-GR-DataTypes.asn",
+ "MAP-Group-Call-Operations.asn",
+ "MAP-LCS-DataTypes.asn",
+ "MAP-LocationServiceOperations.asn",
+ "MAP-MobileServiceOperations.asn",
+ "MAP-MS-DataTypes.asn",
+ "MAP-OM-DataTypes.asn",
+ "MAP-OperationAndMaintenanceOperations.asn",
+ "MAP-Protocol.asn",
+ "MAP-SecureTransportOperations.asn",
+ "MAP-ShortMessageServiceOperations.asn",
+ "MAP-SM-DataTypes.asn",
+ "MAP-SS-Code.asn",
+ "MAP-SS-DataTypes.asn",
+ "MAP-ST-DataTypes.asn",
+ "MAP-SupplementaryServiceOperations.asn",
+ "MAP-TS-Code.asn",
+ "MobileDomainDefinitions.asn",
+ "Remote-Operations-Generic-ROS-PDUs.asn",
+ "Remote-Operations-Information-Objects.asn",
+ "Remote-Operations-Useful-Definitions.asn",
+ "TCAP-Examples.asn",
+ "TCAPMessages.asn",
+ "TCAP-Tools.asn",
+ "TC-Notation-Extensions.asn",
+ "UnidialoguePDUs.asn"]],
+ ok.
diff --git a/lib/asn1/test/testTypeValueNotation.erl b/lib/asn1/test/testTypeValueNotation.erl
index f0699370e0..d2ef1216e2 100644
--- a/lib/asn1/test/testTypeValueNotation.erl
+++ b/lib/asn1/test/testTypeValueNotation.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,26 +19,12 @@
%%
-module(testTypeValueNotation).
--export([compile/3]).
-export([main/2]).
-include_lib("test_server/include/test_server.hrl").
-record('Seq',{octstr, int, bool, enum, bitstr, null, oid, vstr}).
-
-compile(Config,Rules,Options) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefPrim",
- [Rules,{outdir,OutDir}]++Options),
- %% OTP-6695
- ?line ok = asn1ct:compile(DataDir ++ "ValueTest",
- [Rules,{outdir,OutDir}]++Options).
-
-
main(Rules,Option) ->
io:format("testTypeValueNotation:main/2 with arguments:~nRules: ~w, Option: ~w~n",[Rules,Option]),
diff --git a/lib/asn1/test/testX420.erl b/lib/asn1/test/testX420.erl
index 1d18e76c48..abdbbfe536 100644
--- a/lib/asn1/test/testX420.erl
+++ b/lib/asn1/test/testX420.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,32 +26,21 @@
-include_lib("test_server/include/test_server.hrl").
-compile(Erule,Options,Config) ->
-
+compile(Erule, Options, Config) ->
Specs = specs(),
- ?line 99 = length(Specs),
- ?line ok = compile_loop(Erule,Specs,Options,Config).
-
-
+ 99 = length(Specs),
+ ok = compile_loop(Erule,Specs,Options,Config).
-compile_loop(_Erule,[],_Options,_Config) ->
+compile_loop(_Erule, [], _Options, _Config) ->
ok;
-compile_loop(Erule,[Spec|Specs],Options,Config)
- when Erule == ber; Erule == ber_bin; Erule == ber_bin_v2;
- Erule == per ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- case asn1ct:compile(DataDir ++ "/x420/" ++ Spec,[Erule,{outdir,OutDir},
- {i,OutDir}]++Options) of
- ok ->
- compile_loop(Erule,Specs,Options,Config);
- Error ->
- Error
- end;
-compile_loop(_Erule,_Specs,_Options,_Config) ->
- ok.%%{skip,io_lib:format("Not tested for ~p",[Erule])}.
+compile_loop(Erule, [Spec|Specs], Options, Config)
+ when Erule == ber; Erule == ber_bin; Erule == ber_bin_v2; Erule == per ->
+ CaseDir = ?config(case_dir, Config),
+ asn1_test_lib:compile(filename:join([x420, Spec]), Config,
+ [Erule, {i, CaseDir}]),
+ compile_loop(Erule, Specs, Options, Config);
+compile_loop(_Erule, _Specs, _Options, _Config) ->
+ ok.
specs() ->
@@ -91,7 +80,7 @@ specs() ->
"Protected-Part-Descriptors", "ProtocolObjectIdentifiers",
"Raster-Gr-Coding-Attributes", "Raster-Gr-Presentation-Attributes",
"Raster-Gr-Profile-Attributes", "Reliable-Transfer-APDU",
- "Remote-Operations-Abstract-Syntaxes",
+ "Remote-Operations-Abstract-Syntaxes",
"Remote-Operations-Generic-ROS-PDUs",
"Remote-Operations-Information-Objects-extensions",
"Remote-Operations-Information-Objects",
diff --git a/lib/asn1/test/test_compile_options.erl b/lib/asn1/test/test_compile_options.erl
index a622d5bfd2..4e732308d8 100644
--- a/lib/asn1/test/test_compile_options.erl
+++ b/lib/asn1/test/test_compile_options.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,10 +40,7 @@ wrong_path(Config) ->
comp(Parent,Config) ->
DataDir = ?config(data_dir,Config),
OutDir = ?config(priv_dir,Config),
- %%?line true = code:add_patha(?config(priv_dir,Config)),
- io:format("DataDir: ~p~n",[DataDir]),
?line Err=asn1ct:compile(DataDir++"NoImport",[{i,OutDir},{i,filename:join([DataDir,"subdir"])},{outdir,OutDir}]),
- io:format("compiling process terminated with value: ~p~n",[Err]),
Parent!Err.
%% OTP-5701
@@ -67,13 +64,7 @@ path(Config) ->
file:set_cwd(CWD),
ok.
-ticket_6143(Config) ->
- DataDir = ?config(data_dir,Config),
- OutDir = ?config(priv_dir,Config),
- io:format("DataDir: ~p~n",[DataDir]),
-
- ?line ok=asn1ct:compile(filename:join([DataDir,"AA1"]),[{i,DataDir},{outdir,OutDir}]),
- ok.
+ticket_6143(Config) -> asn1_test_lib:compile("AA1", Config, []).
noobj(Config) ->
DataDir = ?config(data_dir,Config),
diff --git a/lib/asn1/test/test_driver_load.erl b/lib/asn1/test/test_driver_load.erl
index 965f2473e9..e0e6602046 100644
--- a/lib/asn1/test/test_driver_load.erl
+++ b/lib/asn1/test/test_driver_load.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,29 +19,16 @@
%%
-module(test_driver_load).
--export([compile/2,test/2,encode/0]).
+-export([test/1,encode/0]).
-include_lib("test_server/include/test_server.hrl").
-test(per_bin,0) ->
+test(0) ->
ok;
-test(per_bin,N) ->
+test(N) ->
spawn(?MODULE,encode,[]),
- test(per_bin,N-1);
-test(_,_) ->
- ok.
-
-compile(Config,per_bin) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "P-Record",
- [per_bin,optimize,{outdir,OutDir}]);
-compile(_,Erule) ->
- {skip,lists:concat(["not implemented for version: ",Erule])}.
-
+ test(N-1).
encode() ->
?line Msg = msg(),
diff --git a/lib/asn1/test/test_inline.erl b/lib/asn1/test/test_inline.erl
index 8e25e65838..62625572e3 100644
--- a/lib/asn1/test/test_inline.erl
+++ b/lib/asn1/test/test_inline.erl
@@ -19,7 +19,7 @@
%%
-module(test_inline).
--export([compile/3,main/2,inline1/3,performance/1,performance2/0]).
+-export([compile/2,main/2,inline1/3,performance/1,performance2/0]).
-export([mvrasn_inlined_encdec/2,mvrasn_encdec/2,
mi_encdec/2,m_encdec/2]).
@@ -27,48 +27,34 @@
-define(times, 5000).
-define(times2, 50000).
-compile(Config,_Rules,Opt) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line true = code:add_patha(DataDir),
-
- ?line ok=asn1ct:compile(DataDir++"Mvrasn.set.asn",[{inline,mvrasn_inlined},{outdir,OutDir}]++Opt),
-% ?line ok=asn1ct:compile(DataDir++"Mvrasn-11-6.asn",[{outdir,OutDir}]++Opt),
+compile(Config, Options) ->
+ CaseDir = ?config(case_dir, Config),
+ asn1_test_lib:compile("Mvrasn.set.asn", Config, [{inline, mvrasn_inlined}|Options]),
+ asn1_test_lib:compile("Mod.set.asn", Config, [{inline, m}|Options]),
+ ok = remove_inlined_files(CaseDir, [filename:join([CaseDir, X])||X<-["m.erl", "m.beam"]]),
+ asn1_test_lib:compile("Mod.set.asn", Config, [inline|Options]),
+ ok = remove_inlined_files(CaseDir, []).
- ?line ok=asn1ct:compile(DataDir++"Mod.set.asn",[{inline,m},{outdir,OutDir}]++Opt),
- ?line ok=remove_inlined_files(OutDir,[filename:join([OutDir,X])||X<-["m.erl","m.beam"]]),
- ?line ok=asn1ct:compile(DataDir++"Mod.set.asn",[inline,{outdir,OutDir}]++Opt),
- ?line ok=remove_inlined_files(OutDir,[]).
-
-inline1(Config,Rule,Opt) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- ?line ok=asn1ct:compile(DataDir++"P-Record",
- [{inline,'inlined_P_Record'},
- {outdir,OutDir}]++Opt),
- ?line test_inline1(),
-
- ?line ok=remove_inlined_files2(OutDir,ber_bin_v2),
+inline1(Config, Rule, Opt) ->
+ CaseDir = ?config(case_dir, Config),
+
+ asn1_test_lib:compile("P-Record", Config, [{inline, 'inlined_P_Record'}|Opt]),
+ test_inline1(),
+
+ ok=remove_inlined_files2(CaseDir, ber_bin_v2),
case Rule of
- ber_bin_v2 ->
- ?line ok=asn1ct:compile(DataDir++"P-Record",
- [inline,asn1config,ber_bin,optimize,
- {outdir,OutDir}]++Opt),
- ?line test_inline2(Rule,'P-Record'),
- ?line remove_inlined_files3(OutDir,Rule),
- io:format("compiling ~p~nwith ~p~n",
- [DataDir ++ "p_record.set.asn",
- [inline,asn1config,ber_bin,optimize,{outdir,OutDir}]++Opt]),
- ?line ok = asn1ct:compile(DataDir ++ "p_record.set.asn",
- [inline,asn1config,ber_bin,optimize,
- {outdir,OutDir}]++Opt),
- ?line test_inline2(Rule,'p_record'),
- ?line remove_inlined_files4(OutDir,Rule);
- _ ->
- ok
+ ber_bin_v2 ->
+ asn1_test_lib:compile("P-Record", Config,
+ [ber_bin, inline, asn1config, optimize|Opt]),
+ test_inline2(Rule, 'P-Record'),
+ remove_inlined_files3(CaseDir, Rule),
+ asn1_test_lib:compile("p_record.set.asn", Config,
+ [ber_bin, inline, asn1config, optimize|Opt]),
+ test_inline2(Rule, 'p_record'),
+ remove_inlined_files4(CaseDir, Rule);
+ _ ->
+ ok
end.
main(Config, _Erule) ->
@@ -96,12 +82,10 @@ test_inline2(_,_) ->
val(Config) ->
{ok,Val} = asn1ct:value('Mvrasn','InsertSubscriberDataArg',
- [{i, ?config(priv_dir, Config)}]),
+ [{i, ?config(case_dir, Config)}]),
Val.
performance(Config) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line true = code:add_patha(?config(data_dir,Config)),
Val = val(Config),
%% warm up
timer:tc(?MODULE,mvrasn_inlined_encdec,[2,Val]),
diff --git a/lib/asn1/test/test_modified_x420.erl b/lib/asn1/test/test_modified_x420.erl
index fb8734ac21..5a4b529375 100644
--- a/lib/asn1/test/test_modified_x420.erl
+++ b/lib/asn1/test/test_modified_x420.erl
@@ -25,12 +25,9 @@
-include_lib("test_server/include/test_server.hrl").
compile(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
-
- ok = asn1ct:compile(filename:join([DataDir,modified_x420,"PKCS7"]),[der,{outdir,OutDir},{i,OutDir}]),
- ok = asn1ct:compile(filename:join([DataDir,modified_x420,"InformationFramework"]),[der,{outdir,OutDir},{i,OutDir}]),
- ok = asn1ct:compile(filename:join([DataDir,modified_x420,"AuthenticationFramework"]),[der,{outdir,OutDir},{i,OutDir}]).
+ [asn1_test_lib:compile(filename:join([modified_x420,M]), Config, [der])
+ || M <- ["PKCS7", "InformationFramework", "AuthenticationFramework"]],
+ ok.
test_io(Config) ->
io:format("~p~n~n", [catch test(Config)]).
diff --git a/lib/asn1/test/test_partial_incomplete_decode.erl b/lib/asn1/test/test_partial_incomplete_decode.erl
index a2e0a96bd8..df56c27115 100644
--- a/lib/asn1/test/test_partial_incomplete_decode.erl
+++ b/lib/asn1/test/test_partial_incomplete_decode.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,40 +19,11 @@
%%
-module(test_partial_incomplete_decode).
--export([compile/3,test/2]).
+-export([test/1]).
-include_lib("test_server/include/test_server.hrl").
-
-
-compile(Config,Rule,Opt) when Rule == ber_bin_v2 ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecSeq.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecSeq2.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecSeq3.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "PartialDecMyHTTP.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "MEDIA-GATEWAY-CONTROL.asn",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt),
- ?line ok = asn1ct:compile(DataDir ++ "P-Record",
- [Rule,{outdir,OutDir},{i,DataDir},
- asn1config]++Opt);
-compile(_,Rule,_) ->
- {skip,lists:concat(["not implemented yet for version: ",Rule])}.
-
-test(ber_bin_v2,Config) ->
+test(Config) ->
FMsg = msg('F'),
?line {ok,Bytes} = asn1_wrapper:encode('PartialDecSeq','F',FMsg),
?line {ok,_} = asn1_wrapper:decode('PartialDecSeq','F',Bytes),
@@ -110,9 +81,7 @@ test(ber_bin_v2,Config) ->
%% test of MEDIA-GATEWAY-CONTROL
test_megaco(Config),
- ok;
-test(Erule,_) ->
- {skip,lists:concat(["not implemented yet for version: ",Erule])}.
+ ok.
test_megaco(Config) ->
?line DataDir = ?config(data_dir,Config),
diff --git a/lib/asn1/test/test_selective_decode.erl b/lib/asn1/test/test_selective_decode.erl
index e1e101b622..bb348611da 100644
--- a/lib/asn1/test/test_selective_decode.erl
+++ b/lib/asn1/test/test_selective_decode.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,12 +19,12 @@
%%
-module(test_selective_decode).
--export([test/2]).
+-export([test/0]).
-include_lib("test_server/include/test_server.hrl").
-test(ber_bin_v2,_Config) ->
+test() ->
FMsg = msg('F'),
?line {ok,Bytes} = asn1_wrapper:encode('PartialDecSeq','F',FMsg),
?line {ok,3} =
@@ -48,10 +48,7 @@ test(ber_bin_v2,_Config) ->
?line {ok,Bytes4} = asn1_wrapper:encode('P-Record','PersonnelRecord',
PRecMsg),
?line {ok,_} = 'P-Record':sel_dec(list_to_binary(Bytes4)),
-
- ok;
-test(Erule,_) ->
- {skip,lists:concat(["not implemented yet for version: ",Erule])}.
+ ok.
diff --git a/lib/asn1/test/test_special_decode_performance.erl b/lib/asn1/test/test_special_decode_performance.erl
index 60a95a3675..4ac0ff2b27 100644
--- a/lib/asn1/test/test_special_decode_performance.erl
+++ b/lib/asn1/test/test_special_decode_performance.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,25 +19,10 @@
%%
-module(test_special_decode_performance).
--export([compile/2,go/1,loop2/4,loop1/5]).
+-export([go/1,loop2/4,loop1/5]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rule) when Rule==ber_bin_v2 ->
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line asn1ct:compile(DataDir++"MEDIA-GATEWAY-CONTROL",
- [ber_bin,optimize,asn1config,{outdir,OutDir},
- {i,DataDir}]),
- ?line asn1ct:compile(DataDir++"PartialDecSeq",
- [ber_bin,optimize,asn1config,{outdir,OutDir},
- {i,DataDir}]);
-compile(_,Rule) ->
- {skip,lists:concat(["not implemented yet for version: ",Rule])}.
-
go(all) ->
{Time_S_s,Time_S_e,Time_S_c}=go(10000,'PartialDecSeq'),
{Time_MGC_s,Time_MGC_e,Time_MGC_c}=go(10000,'MEDIA-GATEWAY-CONTROL'),
diff --git a/lib/asn1/test/test_undecoded_rest.erl b/lib/asn1/test/test_undecoded_rest.erl
index 277bad3a0a..0c248a840a 100644
--- a/lib/asn1/test/test_undecoded_rest.erl
+++ b/lib/asn1/test/test_undecoded_rest.erl
@@ -19,25 +19,16 @@
%%
-module(test_undecoded_rest).
--export([compile/3,test/2]).
+-export([test/2]).
-include_lib("test_server/include/test_server.hrl").
%% testing OTP-5104
-compile(Config,Rules,Opt) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
- ?line ok = asn1ct:compile(DataDir ++ "P-Record",[Rules,{outdir,OutDir}]++Opt).
-
-
test(Opt, Config) ->
?line {ok,Msg} = asn1ct:value('P-Record','PersonnelRecord',
- [{i, ?config(priv_dir, Config)}]),
+ [{i, ?config(case_dir, Config)}]),
?line {ok,Bytes} = asn1_wrapper:encode('P-Record','PersonnelRecord',Msg),
Bytes2 =
fun(B) when is_list(B) ->
diff --git a/lib/asn1/test/test_x691.erl b/lib/asn1/test/test_x691.erl
index bc8a3495d8..6355c30cc2 100644
--- a/lib/asn1/test/test_x691.erl
+++ b/lib/asn1/test/test_x691.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,23 +19,14 @@
%%
-module(test_x691).
--export([compile/3]).
+-export([compile/2]).
-export([cases/2]).
-include_lib("test_server/include/test_server.hrl").
-
-compile(Config,Rules,Option) ->
-
- ?line DataDir = ?config(data_dir,Config),
- ?line OutDir = ?config(priv_dir,Config),
- ?line true = code:add_patha(?config(priv_dir,Config)),
- ?line ok = asn1ct:compile(DataDir ++ "P-RecordA1",
- [Rules, {outdir,OutDir}]++Option),
- ?line ok = asn1ct:compile(DataDir ++ "P-RecordA2",
- [Rules, {outdir,OutDir}]++Option),
- ?line ok = asn1ct:compile(DataDir ++ "P-RecordA3",
- [Rules, {outdir,OutDir}]++Option).
+compile(Config, Options) ->
+ asn1_test_lib:compile_all(["P-RecordA1", "P-RecordA2", "P-RecordA3"],
+ Config, Options).
cases(Erule,Variant) ->