Commit 9bc85d15 authored by balaskoa's avatar balaskoa
Browse files

New tests have been added + naming convention update - Bug 499886


Signed-off-by: default avatarbalaskoa <jeno.balasko@ericsson.com>
parent 482ecdf2
############################################################################### ###############################################################################
# Copyright (c) 2000-2015 Ericsson Telecom AB # Copyright (c) 2000-2016 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0 # are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at # which accompanies this distribution, and is available at
...@@ -8,15 +8,18 @@ ...@@ -8,15 +8,18 @@
[DEFINE] [DEFINE]
# In this section you can create macro definitions, # In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE]. # that can be used in other configuration file sections except [INCLUDE].
d_boolean := "true"
d_bool_true1 := "true" d_bool_true1 := "true"
d_bool_true2 := true d_bool_true2 := true
d_bool_false1 := "false" d_bool_false1 := "false"
d_bool_false2 := false d_bool_false2 := false
d_integer := 5
d_integer1 := 5 d_integer1 := 5
d_integer2 := -5 d_integer2 := -5
d_float1 := 1.0 d_float1 := 1.0
d_float2 := -1.0 d_float2 := -1.0
d_float3 := 1.0e2 d_float3 := 1.0e2
d_hostname := "localhost"
d_objid := "objid {0 0 0 0 }" d_objid := "objid {0 0 0 0 }"
d_verdict_none := none d_verdict_none := none
d_verdict_pass := pass d_verdict_pass := pass
...@@ -38,7 +41,7 @@ d_null1:= null ...@@ -38,7 +41,7 @@ d_null1:= null
d_null2 := NULL d_null2 := NULL
d_mtc := mtc d_mtc := mtc
d_system := system d_system := system
enum_identifier = "MyEnum"
#strange names testing the usability of words that are keywords in other sections #strange names testing the usability of words that are keywords in other sections
true := true true := true
false := false false := false
...@@ -323,7 +326,7 @@ LogfileNumber := 5 ...@@ -323,7 +326,7 @@ LogfileNumber := 5
LogFilenumber := 5 LogFilenumber := 5
LogFileNumber := 5 LogFileNumber := 5
LogFileNumber := ${d_integer, integer} LogFileNumber := ${d_integer, integer}
LogFileNumber := ${d_integer_nonexi, integer}
logfilesize := 5 logfilesize := 5
logfileSize := 5 logfileSize := 5
logFilesize := 5 logFilesize := 5
...@@ -360,6 +363,7 @@ logSourceInfo := no ...@@ -360,6 +363,7 @@ logSourceInfo := no
Logsourceinfo := No Logsourceinfo := No
LogsourceInfo := NO LogsourceInfo := NO
LogSourceinfo := ${d_boolean, boolean} LogSourceinfo := ${d_boolean, boolean}
LogSourceinfo := ${d_boolean_nonexi, boolean}
LogSourceInfo := none LogSourceInfo := none
sourceinfoformat := none sourceinfoformat := none
sourceinfoFormat := None sourceinfoFormat := None
...@@ -414,7 +418,7 @@ pluginSpecific := "something" & "something" ...@@ -414,7 +418,7 @@ pluginSpecific := "something" & "something"
[TESTPORT_PARAMETERS] [TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports. # In this section you can specify parameters that are passed to Test Ports.
component.testport.id := "value"; component.testport.id := "value1";
${enum_identifier, identifier}.testport.id := "value"; ${enum_identifier, identifier}.testport.id := "value";
5.testport.id := "value" 5.testport.id := "value"
${d_integer, integer}.testport.id := "value" ${d_integer, integer}.testport.id := "value"
...@@ -423,7 +427,7 @@ system.testport.id := "value" ...@@ -423,7 +427,7 @@ system.testport.id := "value"
*.testport.id := "value" *.testport.id := "value"
component.testport[5+5].id := "value" component.testport[5+5].id := "value"
component.*.id := "value" component.*.id := "value"
component.testport.${enum_identifier, identifier} := "value" & "value" component.testport.${enum_identifier, identifier} := "value"&"value"
[INCLUDE] [INCLUDE]
# To use configuration settings given in other configuration files, # To use configuration settings given in other configuration files,
...@@ -596,4 +600,5 @@ localAddress := 5 ...@@ -596,4 +600,5 @@ localAddress := 5
Localaddress := 5.0 Localaddress := 5.0
LocalAddress := 127.0.0.1 LocalAddress := 127.0.0.1
LocalAddress := id-0_i-0.1 LocalAddress := id-0_i-0.1
LocalAddress := ${d_hostname, hostname} LocalAddress := ${d_hostname, hostname}
\ No newline at end of file LocalAddress := ${d_hostname_nonexi, hostname}
\ No newline at end of file
...@@ -187,5 +187,5 @@ tsp_e1:=${e,integer} ...@@ -187,5 +187,5 @@ tsp_e1:=${e,integer}
tsp_f1=$f tsp_f1=$f
tsp_i1=${i,charstring} tsp_i1=${i,charstring}
tsp_o1=${o1,octetstring} tsp_o1=${o1,octetstring}
mp_int := ${val,integer} tsp_int := ${val,integer}
mp_str := $ES_TEE_AR tsp_str := $ES_TEE_AR
...@@ -76,8 +76,8 @@ modulepar { ...@@ -76,8 +76,8 @@ modulepar {
charstring tsp_i1:="" charstring tsp_i1:=""
octetstring tsp_o1:=''O; octetstring tsp_o1:=''O;
integer mp_int := 0; integer tsp_int := 0;
charstring mp_str := "cool"; charstring tsp_str := "cool";
} }
type component MyComp_CT{} type component MyComp_CT{}
...@@ -275,8 +275,8 @@ testcase tc_defio1() runs on MyComp_CT { ...@@ -275,8 +275,8 @@ testcase tc_defio1() runs on MyComp_CT {
// Duplicate defines // Duplicate defines
testcase tc_duplicate() runs on MyComp_CT { testcase tc_duplicate() runs on MyComp_CT {
if (mp_int == -8) { setverdict(pass) } else { setverdict(fail, "mp_int=", mp_int) } if (tsp_int == -8) { setverdict(pass) } else { setverdict(fail, "mp_int=", tsp_int) }
if (mp_str == "not cool, man") { setverdict(pass) } else { setverdict(fail, "mp_str=", mp_str) } if (tsp_str == "not cool, man") { setverdict(pass) } else { setverdict(fail, "mp_str=", tsp_str) }
} }
control{ control{
......
...@@ -227,3 +227,6 @@ mycomp1.myport.a := "1" ...@@ -227,3 +227,6 @@ mycomp1.myport.a := "1"
[EXECUTE] [EXECUTE]
ipv6.control ipv6.control
[DEFINE]
enum_identifier := "MyEnum"
\ No newline at end of file
...@@ -136,7 +136,7 @@ modulepar MyRec tsp_record_MyRec1; ...@@ -136,7 +136,7 @@ modulepar MyRec tsp_record_MyRec1;
modulepar MyRec tsp_record_MyRec_duplicate; modulepar MyRec tsp_record_MyRec_duplicate;
modulepar MyRecursive tsp_record_MyRecursive1; modulepar MyRecursive tsp_record_MyRecursive1;
modulepar MyRecursive tsp_record_MyRecursive2; modulepar MyRecursive tsp_record_MyRecursive2;
modulepar MyRecEnum enum; modulepar MyRecEnum tsp_enum;
// Set // Set
modulepar EmptySet tsp_set_empty; modulepar EmptySet tsp_set_empty;
...@@ -275,10 +275,10 @@ testcase tc_objid() runs on MyComp_CT { ...@@ -275,10 +275,10 @@ testcase tc_objid() runs on MyComp_CT {
if (tsp_objid_number_init == objid {0 4 0 12345 6789}) if (tsp_objid_number_init == objid {0 4 0 12345 6789})
{setverdict(pass);} else { setverdict(fail); } {setverdict(pass);} else { setverdict(fail); }
const objid expected := objid{itu_t(0) identified_organization(4) etsi(0) 12345 6789} const objid cl_expected := objid{itu_t(0) identified_organization(4) etsi(0) 12345 6789}
if (tsp_objid_name_number == expected ) if (tsp_objid_name_number == cl_expected )
{setverdict(pass);} else { setverdict(fail); } {setverdict(pass);} else { setverdict(fail); }
if (tsp_objid_name_number_init == expected ) if (tsp_objid_name_number_init == cl_expected )
{setverdict(pass);} else { setverdict(fail); } {setverdict(pass);} else { setverdict(fail); }
} }
...@@ -319,9 +319,9 @@ testcase tc_universal_charstring() runs on MyComp_CT { ...@@ -319,9 +319,9 @@ testcase tc_universal_charstring() runs on MyComp_CT {
if (tsp_univ_charstr_empty_init == "") {setverdict(pass); } else {setverdict(fail); } if (tsp_univ_charstr_empty_init == "") {setverdict(pass); } else {setverdict(fail); }
const universal charstring expected := const universal charstring cl_expected :=
"Character " & char(0, 0, 1, 113) & " is a hungarian letter."; "Character " & char(0, 0, 1, 113) & " is a hungarian letter.";
if (tsp_univ_charstr_1 == expected) if (tsp_univ_charstr_1 == cl_expected)
{ setverdict(pass); } else { setverdict(fail); } { setverdict(pass); } else { setverdict(fail); }
} }
...@@ -378,11 +378,11 @@ testcase tc_record() runs on MyComp_CT { ...@@ -378,11 +378,11 @@ testcase tc_record() runs on MyComp_CT {
and not isbound(tsp_record_MyRecursive1.field2)) and not isbound(tsp_record_MyRecursive1.field2))
{ setverdict(pass); } else {setverdict(fail, "tsp_record_MyRecursive1");} { setverdict(pass); } else {setverdict(fail, "tsp_record_MyRecursive1");}
const MyRecursive expected := {1, {2, {3}}}; const MyRecursive cl_expected := {1, {2, {3}}};
if (tsp_record_MyRecursive2 == expected) if (tsp_record_MyRecursive2 == cl_expected)
{ setverdict(pass); } else {setverdict(fail, "tsp_record_MyRecursive2");} { setverdict(pass); } else {setverdict(fail, "tsp_record_MyRecursive2");}
if (enum.enum == 42) if (tsp_enum.enum == 42)
{ setverdict(pass); } else {setverdict(fail, "enum.enum");} { setverdict(pass); } else {setverdict(fail, "enum.enum");}
} }
...@@ -407,8 +407,8 @@ testcase tc_set() runs on MyComp_CT { ...@@ -407,8 +407,8 @@ testcase tc_set() runs on MyComp_CT {
and not isbound(tsp_set_MyRecursiveSet1.field2)) and not isbound(tsp_set_MyRecursiveSet1.field2))
{ setverdict(pass); } else {setverdict(fail, "tsp_set_MyRecursiveSet");} { setverdict(pass); } else {setverdict(fail, "tsp_set_MyRecursiveSet");}
const MyRecursiveSet expected := {1, {2, {3}}}; const MyRecursiveSet cl_expected := {1, {2, {3}}};
if (tsp_set_MyRecursiveSet2 == expected) if (tsp_set_MyRecursiveSet2 == cl_expected)
{ setverdict(pass); } else {setverdict(fail, "tsp_set_MyRecursiveSet");} { setverdict(pass); } else {setverdict(fail, "tsp_set_MyRecursiveSet");}
} }
......
...@@ -18,134 +18,134 @@ MACRO_INT := 1 ...@@ -18,134 +18,134 @@ MACRO_INT := 1
[MODULE_PARAMETERS] [MODULE_PARAMETERS]
# integer # integer
mp1 := 1 tsp_1 := 1
mp1 := mp1 - 1 - ${MACRO_INT, integer} tsp_1 := tsp_1 - 1 - ${MACRO_INT, integer}
mp1 := +1; tsp_1 := +1;
mp1 := mp1 + 1; tsp_1 := tsp_1 + 1;
mp2 := mp1 - mp2 + 10 / mp1; tsp_2 := tsp_1 - tsp_2 + 10 / tsp_1;
mp3 := (mp1 + 2) * 5; tsp_3 := (tsp_1 + 2) * 5;
mp3 := mp3 + mplist2[mp1 - 1 - ${MACRO_INT, integer}]; tsp_3 := tsp_3 + tsp_list2[tsp_1 - 1 - ${MACRO_INT, integer}];
# float # float
mp4 := -3.0; tsp_4 := -3.0;
mp5 := +mp4 / 0.5 - 1.5 * (mp5 + 1.0); tsp_5 := +tsp_4 / 0.5 - 1.5 * (tsp_5 + 1.0);
# bitstring # bitstring
mpbs1 &= '1101'B & mpbs2 & '01'B; tsp_bs1 &= '1101'B & tsp_bs2 & '01'B;
mpbs2 := mpbs2 & mpbs1; tsp_bs2 := tsp_bs2 & tsp_bs1;
mpbs1 &= mpbs2; tsp_bs1 &= tsp_bs2;
# hexstring # hexstring
mphs1 := '77FF'H & mphs1 & mphs2; tsp_hs1 := '77FF'H & tsp_hs1 & tsp_hs2;
mphs2 &= 'EE'H; tsp_hs2 &= 'EE'H;
# octetstring # octetstring
mpos1 := 'DEAD'O; tsp_os1 := 'DEAD'O;
mpos2 := 'A22C'O & mpos1 & 'C22A'O; tsp_os2 := 'A22C'O & tsp_os1 & 'C22A'O;
# charstring # charstring
mpcs1 &= mpcs2; tsp_cs1 &= tsp_cs2;
mpcs1 := mpcs1 & "ghi"; tsp_cs1 := tsp_cs1 & "ghi";
mpcs2 := "xx" & mpcs1 & "xx" & mpcs2; tsp_cs2 := "xx" & tsp_cs1 & "xx" & tsp_cs2;
mpcs3 := mpucs1 & "xx"; tsp_cs3 := tsp_ucs1 & "xx";
# universal charstring # universal charstring
mpucs1 := "a" & mpucs2; tsp_ucs1 := "a" & tsp_ucs2;
mpucs2 := "űrhajó" & mpcs1 & char(mp1 + 1, 5, mp1 * 5, 5) & "x"; tsp_ucs2 := "űrhajó" & tsp_cs1 & char(tsp_1 + 1, 5, tsp_1 * 5, 5) & "x";
# boolean # boolean
mpb1 := mpb2; tsp_b1 := tsp_b2;
mpb2 := mpuni2.bval; tsp_b2 := tsp_uni2.bval;
#mpb2 := not mpb2; #not works, not required #tsp_b2 := not tsp_b2; #not works, not required
# objid # objid
mpobjid2 := mpobjid1; tsp_objid2 := tsp_objid1;
# verdicttype # verdicttype
mpvt2 := mpvt1; tsp_vt2 := tsp_vt1;
# component # cotsp_onent
mpcomp2 := mpcomp1; tsp_cotsp_2 := tsp_cotsp_1;
# default # default
mpdef2 := mpdef1; tsp_def2 := tsp_def1;
# enumerated # enumerated
mpenum2 := references.mpenum1; tsp_enum2 := references.tsp_enum1;
mpenum1 := Large; tsp_enum1 := Large;
# record of # record of
mplist1 := mplist2; tsp_list1 := tsp_list2;
mplist2 := { [mp1 / 2] := 3, [0] := mprec1.num }; tsp_list2 := { [tsp_1 / 2] := 3, [0] := tsp_rec1.num };
mplist2 &= mplist1; tsp_list2 &= tsp_list1;
# record # record
mprec3 := mprec1; tsp_rec3 := tsp_rec1;
mprec1 := mprec2; tsp_rec1 := tsp_rec2;
mprec2 := mprec3; tsp_rec2 := tsp_rec3;
mprec3 := { mplist1[0], mpcs1 }; tsp_rec3 := { tsp_list1[0], tsp_cs1 };
# empty record # empty record
mpemptyrec2 := mpemptyrec1; tsp_emptyrec2 := tsp_emptyrec1;
# union # union
mpuni3 := mpuni1; tsp_uni3 := tsp_uni1;
mpuni1 := mpuni2; tsp_uni1 := tsp_uni2;
mpuni2 := mpuni3; tsp_uni2 := tsp_uni3;
mpuni3 := { osval := mpos1 & mpos2 }; tsp_uni3 := { osval := tsp_os1 & tsp_os2 };
# array # array
mparray1 := { mparray2[0], mpcs1 & "xx" }; tsp_array1 := { tsp_array2[0], tsp_cs1 & "xx" };
mparray2 := mparray1; tsp_array2 := tsp_array1;
# integer template # integer template
mptint1 := mptint2; tsp_tint1 := tsp_tint2;
mptint2 := (mp1 + 6, mp2, - mp3, - ${MACRO_INT, integer}); tsp_tint2 := (tsp_1 + 6, tsp_2, - tsp_3, - ${MACRO_INT, integer});
# float template # float template
mptf1 := mptf2 ifpresent; tsp_tf1 := tsp_tf2 ifpresent;
mptf2 := (mp4 / 2.0, mp5 * 1.5); tsp_tf2 := (tsp_4 / 2.0, tsp_5 * 1.5);
# charstring template # charstring template
mptcs1 := mptcs1 length(2 .. mp2 - 1); tsp_tcs1 := tsp_tcs1 length(2 .. tsp_2 - 1);
mptcs2 := "xx" & mptcs2 & "xx" ifpresent; tsp_tcs2 := "xx" & tsp_tcs2 & "xx" ifpresent;
mptcs3 := mptcs3 & "d" & mptarray2[1]; tsp_tcs3 := tsp_tcs3 & "d" & tsp_tarray2[1];
# universal charstring template # universal charstring template
mptucs3 := (mptucs1, ("a".."z")); tsp_tucs3 := (tsp_tucs1, ("a".."z"));
mptucs2 := "zz" & mpucs2 & "zz"; tsp_tucs2 := "zz" & tsp_ucs2 & "zz";
mptucs1 := pattern "a??b" & ${MACRO_CS} & char(1, 2, 3, 4) & mpucs1; tsp_tucs1 := pattern "a??b" & ${MACRO_CS} & char(1, 2, 3, 4) & tsp_ucs1;
# bitstring template # bitstring template
mptbs1 := '110'B & mpbs1 & '011'B; tsp_tbs1 := '110'B & tsp_bs1 & '011'B;
mptbs2 := mptbs2 ifpresent; tsp_tbs2 := tsp_tbs2 ifpresent;
mptbs3 := mptbs3; tsp_tbs3 := tsp_tbs3;
# hexstring template # hexstring template
mpths1 := 'AB'H & mphs1 & 'BA'H; tsp_ths1 := 'AB'H & tsp_hs1 & 'BA'H;
mpths2 := mpths2; tsp_ths2 := tsp_ths2;
mpths3 := mpths3 length (7..infinity); tsp_ths3 := tsp_ths3 length (7..infinity);
# octetstring template # octetstring template
mptos1 := '01'O & mpos1 & '10'O; tsp_tos1 := '01'O & tsp_os1 & '10'O;
mptos2 := mptos2; tsp_tos2 := tsp_tos2;
mptos3 := mptos3; tsp_tos3 := tsp_tos3;
# boolean template # boolean template
mptb1 := (mptb1, mptb2); tsp_tb1 := (tsp_tb1, tsp_tb2);
mptb2 := mptuni3.bval; tsp_tb2 := tsp_tuni3.bval;
# component template # component template
mptcomp2 := mptcomp1; tsp_tcomp2 := tsp_tctsp_p1;
# default template # default template
mptdef2 := mptdef1; tsp_tdef2 := tsp_tdef1;
# verdicttype template # verdicttype template
mptvt1 := mptvt2; tsp_tvt1 := tsp_tvt2;
mptvt2 := mpvt2; tsp_tvt2 := tsp_vt2;
mptvt3 := inconc; tsp_tvt3 := inconc;
# enumerated template # enumerated template
mptenum1 = mptenum2; mptenum1 = mptenum2;
......
...@@ -22,8 +22,8 @@ modulepar { ...@@ -22,8 +22,8 @@ modulepar {
type component MyComp {} type component MyComp {}
function f_setverdict_C(in charstring p_value,in charstring p_expected){ function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
if(p_value == p_expected) { setverdict(pass) } else{ setverdict(fail, match(p_expected,p_value));}; if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail, match(pl_expected,pl_value));};
} }
with { extension "transparent" } with { extension "transparent" }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment