aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testNBAPsystem.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test/testNBAPsystem.erl')
-rw-r--r--lib/asn1/test/testNBAPsystem.erl87
1 files changed, 16 insertions, 71 deletions
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).