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
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
......@@ -8,15 +8,18 @@
[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE].
d_boolean := "true"
d_bool_true1 := "true"
d_bool_true2 := true
d_bool_false1 := "false"
d_bool_false2 := false
d_integer := 5
d_integer1 := 5
d_integer2 := -5
d_float1 := 1.0
d_float2 := -1.0
d_float3 := 1.0e2
d_hostname := "localhost"
d_objid := "objid {0 0 0 0 }"
d_verdict_none := none
d_verdict_pass := pass
......@@ -38,7 +41,7 @@ d_null1:= null
d_null2 := NULL
d_mtc := mtc
d_system := system
enum_identifier = "MyEnum"
#strange names testing the usability of words that are keywords in other sections
true := true
false := false
......@@ -323,7 +326,7 @@ LogfileNumber := 5
LogFilenumber := 5
LogFileNumber := 5
LogFileNumber := ${d_integer, integer}
LogFileNumber := ${d_integer_nonexi, integer}
logfilesize := 5
logfileSize := 5
logFilesize := 5
......@@ -360,6 +363,7 @@ logSourceInfo := no
Logsourceinfo := No
LogsourceInfo := NO
LogSourceinfo := ${d_boolean, boolean}
LogSourceinfo := ${d_boolean_nonexi, boolean}
LogSourceInfo := none
sourceinfoformat := none
sourceinfoFormat := None
......@@ -414,7 +418,7 @@ pluginSpecific := "something" & "something"
[TESTPORT_PARAMETERS]
# 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";
5.testport.id := "value"
${d_integer, integer}.testport.id := "value"
......@@ -423,7 +427,7 @@ system.testport.id := "value"
*.testport.id := "value"
component.testport[5+5].id := "value"
component.*.id := "value"
component.testport.${enum_identifier, identifier} := "value" & "value"
component.testport.${enum_identifier, identifier} := "value"&"value"
[INCLUDE]
# To use configuration settings given in other configuration files,
......@@ -596,4 +600,5 @@ localAddress := 5
Localaddress := 5.0
LocalAddress := 127.0.0.1
LocalAddress := id-0_i-0.1
LocalAddress := ${d_hostname, hostname}
\ No newline at end of file
LocalAddress := ${d_hostname, hostname}
LocalAddress := ${d_hostname_nonexi, hostname}
\ No newline at end of file
......@@ -187,5 +187,5 @@ tsp_e1:=${e,integer}
tsp_f1=$f
tsp_i1=${i,charstring}
tsp_o1=${o1,octetstring}
mp_int := ${val,integer}
mp_str := $ES_TEE_AR
tsp_int := ${val,integer}
tsp_str := $ES_TEE_AR
......@@ -76,8 +76,8 @@ modulepar {
charstring tsp_i1:=""
octetstring tsp_o1:=''O;
integer mp_int := 0;
charstring mp_str := "cool";
integer tsp_int := 0;
charstring tsp_str := "cool";
}
type component MyComp_CT{}
......@@ -275,8 +275,8 @@ testcase tc_defio1() runs on MyComp_CT {
// Duplicate defines
testcase tc_duplicate() runs on MyComp_CT {
if (mp_int == -8) { setverdict(pass) } else { setverdict(fail, "mp_int=", mp_int) }
if (mp_str == "not cool, man") { setverdict(pass) } else { setverdict(fail, "mp_str=", mp_str) }
if (tsp_int == -8) { setverdict(pass) } else { setverdict(fail, "mp_int=", tsp_int) }
if (tsp_str == "not cool, man") { setverdict(pass) } else { setverdict(fail, "mp_str=", tsp_str) }
}
control{
......
......@@ -227,3 +227,6 @@ mycomp1.myport.a := "1"
[EXECUTE]
ipv6.control
[DEFINE]
enum_identifier := "MyEnum"
\ No newline at end of file
......@@ -136,7 +136,7 @@ modulepar MyRec tsp_record_MyRec1;
modulepar MyRec tsp_record_MyRec_duplicate;
modulepar MyRecursive tsp_record_MyRecursive1;
modulepar MyRecursive tsp_record_MyRecursive2;
modulepar MyRecEnum enum;
modulepar MyRecEnum tsp_enum;
// Set
modulepar EmptySet tsp_set_empty;
......@@ -275,10 +275,10 @@ testcase tc_objid() runs on MyComp_CT {
if (tsp_objid_number_init == objid {0 4 0 12345 6789})
{setverdict(pass);} else { setverdict(fail); }
const objid expected := objid{itu_t(0) identified_organization(4) etsi(0) 12345 6789}
if (tsp_objid_name_number == expected )
const objid cl_expected := objid{itu_t(0) identified_organization(4) etsi(0) 12345 6789}
if (tsp_objid_name_number == cl_expected )
{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); }
}
......@@ -319,9 +319,9 @@ testcase tc_universal_charstring() runs on MyComp_CT {
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.";
if (tsp_univ_charstr_1 == expected)
if (tsp_univ_charstr_1 == cl_expected)
{ setverdict(pass); } else { setverdict(fail); }
}
......@@ -378,11 +378,11 @@ testcase tc_record() runs on MyComp_CT {
and not isbound(tsp_record_MyRecursive1.field2))
{ setverdict(pass); } else {setverdict(fail, "tsp_record_MyRecursive1");}
const MyRecursive expected := {1, {2, {3}}};
if (tsp_record_MyRecursive2 == expected)
const MyRecursive cl_expected := {1, {2, {3}}};
if (tsp_record_MyRecursive2 == cl_expected)
{ setverdict(pass); } else {setverdict(fail, "tsp_record_MyRecursive2");}
if (enum.enum == 42)
if (tsp_enum.enum == 42)
{ setverdict(pass); } else {setverdict(fail, "enum.enum");}
}
......@@ -407,8 +407,8 @@ testcase tc_set() runs on MyComp_CT {
and not isbound(tsp_set_MyRecursiveSet1.field2))
{ setverdict(pass); } else {setverdict(fail, "tsp_set_MyRecursiveSet");}
const MyRecursiveSet expected := {1, {2, {3}}};
if (tsp_set_MyRecursiveSet2 == expected)
const MyRecursiveSet cl_expected := {1, {2, {3}}};
if (tsp_set_MyRecursiveSet2 == cl_expected)
{ setverdict(pass); } else {setverdict(fail, "tsp_set_MyRecursiveSet");}
}
......
......@@ -18,134 +18,134 @@ MACRO_INT := 1
[MODULE_PARAMETERS]
# integer
mp1 := 1
mp1 := mp1 - 1 - ${MACRO_INT, integer}
mp1 := +1;
mp1 := mp1 + 1;
tsp_1 := 1
tsp_1 := tsp_1 - 1 - ${MACRO_INT, integer}
tsp_1 := +1;
tsp_1 := tsp_1 + 1;
mp2 := mp1 - mp2 + 10 / mp1;
mp3 := (mp1 + 2) * 5;
mp3 := mp3 + mplist2[mp1 - 1 - ${MACRO_INT, integer}];
tsp_2 := tsp_1 - tsp_2 + 10 / tsp_1;
tsp_3 := (tsp_1 + 2) * 5;
tsp_3 := tsp_3 + tsp_list2[tsp_1 - 1 - ${MACRO_INT, integer}];
# float
mp4 := -3.0;
mp5 := +mp4 / 0.5 - 1.5 * (mp5 + 1.0);
tsp_4 := -3.0;
tsp_5 := +tsp_4 / 0.5 - 1.5 * (tsp_5 + 1.0);
# bitstring
mpbs1 &= '1101'B & mpbs2 & '01'B;
mpbs2 := mpbs2 & mpbs1;
mpbs1 &= mpbs2;
tsp_bs1 &= '1101'B & tsp_bs2 & '01'B;
tsp_bs2 := tsp_bs2 & tsp_bs1;
tsp_bs1 &= tsp_bs2;
# hexstring
mphs1 := '77FF'H & mphs1 & mphs2;
mphs2 &= 'EE'H;
tsp_hs1 := '77FF'H & tsp_hs1 & tsp_hs2;
tsp_hs2 &= 'EE'H;
# octetstring
mpos1 := 'DEAD'O;
mpos2 := 'A22C'O & mpos1 & 'C22A'O;
tsp_os1 := 'DEAD'O;
tsp_os2 := 'A22C'O & tsp_os1 & 'C22A'O;
# charstring
mpcs1 &= mpcs2;
mpcs1 := mpcs1 & "ghi";
mpcs2 := "xx" & mpcs1 & "xx" & mpcs2;
mpcs3 := mpucs1 & "xx";
tsp_cs1 &= tsp_cs2;
tsp_cs1 := tsp_cs1 & "ghi";
tsp_cs2 := "xx" & tsp_cs1 & "xx" & tsp_cs2;
tsp_cs3 := tsp_ucs1 & "xx";
# universal charstring
mpucs1 := "a" & mpucs2;
mpucs2 := "űrhajó" & mpcs1 & char(mp1 + 1, 5, mp1 * 5, 5) & "x";
tsp_ucs1 := "a" & tsp_ucs2;
tsp_ucs2 := "űrhajó" & tsp_cs1 & char(tsp_1 + 1, 5, tsp_1 * 5, 5) & "x";
# boolean
mpb1 := mpb2;
mpb2 := mpuni2.bval;
#mpb2 := not mpb2; #not works, not required
tsp_b1 := tsp_b2;
tsp_b2 := tsp_uni2.bval;
#tsp_b2 := not tsp_b2; #not works, not required
# objid
mpobjid2 := mpobjid1;
tsp_objid2 := tsp_objid1;
# verdicttype
mpvt2 := mpvt1;
tsp_vt2 := tsp_vt1;
# component
mpcomp2 := mpcomp1;
# cotsp_onent
tsp_cotsp_2 := tsp_cotsp_1;
# default
mpdef2 := mpdef1;
tsp_def2 := tsp_def1;
# enumerated
mpenum2 := references.mpenum1;
mpenum1 := Large;
tsp_enum2 := references.tsp_enum1;
tsp_enum1 := Large;
# record of
mplist1 := mplist2;
mplist2 := { [mp1 / 2] := 3, [0] := mprec1.num };
mplist2 &= mplist1;
tsp_list1 := tsp_list2;
tsp_list2 := { [tsp_1 / 2] := 3, [0] := tsp_rec1.num };
tsp_list2 &= tsp_list1;
# record
mprec3 := mprec1;
mprec1 := mprec2;
mprec2 := mprec3;
mprec3 := { mplist1[0], mpcs1 };
tsp_rec3 := tsp_rec1;
tsp_rec1 := tsp_rec2;
tsp_rec2 := tsp_rec3;
tsp_rec3 := { tsp_list1[0], tsp_cs1 };
# empty record
mpemptyrec2 := mpemptyrec1;
tsp_emptyrec2 := tsp_emptyrec1;
# union
mpuni3 := mpuni1;
mpuni1 := mpuni2;
mpuni2 := mpuni3;
mpuni3 := { osval := mpos1 & mpos2 };
tsp_uni3 := tsp_uni1;
tsp_uni1 := tsp_uni2;
tsp_uni2 := tsp_uni3;
tsp_uni3 := { osval := tsp_os1 & tsp_os2 };
# array
mparray1 := { mparray2[0], mpcs1 & "xx" };
mparray2 := mparray1;
tsp_array1 := { tsp_array2[0], tsp_cs1 & "xx" };
tsp_array2 := tsp_array1;
# integer template
mptint1 := mptint2;
mptint2 := (mp1 + 6, mp2, - mp3, - ${MACRO_INT, integer});
tsp_tint1 := tsp_tint2;
tsp_tint2 := (tsp_1 + 6, tsp_2, - tsp_3, - ${MACRO_INT, integer});
# float template
mptf1 := mptf2 ifpresent;
mptf2 := (mp4 / 2.0, mp5 * 1.5);
tsp_tf1 := tsp_tf2 ifpresent;
tsp_tf2 := (tsp_4 / 2.0, tsp_5 * 1.5);
# charstring template
mptcs1 := mptcs1 length(2 .. mp2 - 1);
mptcs2 := "xx" & mptcs2 & "xx" ifpresent;
mptcs3 := mptcs3 & "d" & mptarray2[1];
tsp_tcs1 := tsp_tcs1 length(2 .. tsp_2 - 1);
tsp_tcs2 := "xx" & tsp_tcs2 & "xx" ifpresent;
tsp_tcs3 := tsp_tcs3 & "d" & tsp_tarray2[1];
# universal charstring template
mptucs3 := (mptucs1, ("a".."z"));
mptucs2 := "zz" & mpucs2 & "zz";
mptucs1 := pattern "a??b" & ${MACRO_CS} & char(1, 2, 3, 4) & mpucs1;
tsp_tucs3 := (tsp_tucs1, ("a".."z"));
tsp_tucs2 := "zz" & tsp_ucs2 & "zz";
tsp_tucs1 := pattern "a??b" & ${MACRO_CS} & char(1, 2, 3, 4) & tsp_ucs1;
# bitstring template
mptbs1 := '110'B & mpbs1 & '011'B;
mptbs2 := mptbs2 ifpresent;
mptbs3 := mptbs3;
tsp_tbs1 := '110'B & tsp_bs1 & '011'B;
tsp_tbs2 := tsp_tbs2 ifpresent;
tsp_tbs3 := tsp_tbs3;
# hexstring template
mpths1 := 'AB'H & mphs1 & 'BA'H;
mpths2 := mpths2;
mpths3 := mpths3 length (7..infinity);
tsp_ths1 := 'AB'H & tsp_hs1 & 'BA'H;
tsp_ths2 := tsp_ths2;
tsp_ths3 := tsp_ths3 length (7..infinity);
# octetstring template
mptos1 := '01'O & mpos1 & '10'O;
mptos2 := mptos2;
mptos3 := mptos3;
tsp_tos1 := '01'O & tsp_os1 & '10'O;
tsp_tos2 := tsp_tos2;
tsp_tos3 := tsp_tos3;
# boolean template
mptb1 := (mptb1, mptb2);
mptb2 := mptuni3.bval;
tsp_tb1 := (tsp_tb1, tsp_tb2);
tsp_tb2 := tsp_tuni3.bval;
# component template
mptcomp2 := mptcomp1;
tsp_tcomp2 := tsp_tctsp_p1;
# default template
mptdef2 := mptdef1;
tsp_tdef2 := tsp_tdef1;
# verdicttype template
mptvt1 := mptvt2;
mptvt2 := mpvt2;
mptvt3 := inconc;
tsp_tvt1 := tsp_tvt2;
tsp_tvt2 := tsp_vt2;
tsp_tvt3 := inconc;
# enumerated template
mptenum1 = mptenum2;
......
......@@ -39,128 +39,128 @@ type record of integer IntList;
type record of charstring TwoStrings;
/******** Module parameters ********/
modulepar integer mp1 := 0;
modulepar integer mp2 := 0;
modulepar integer mp3 := 0;
modulepar integer tsp_1 := 0;
modulepar integer tsp_2 := 0;
modulepar integer tsp_3 := 0;
modulepar float mp4 := 0.0;
modulepar float mp5 := 1.0;
modulepar float tsp_4 := 0.0;
modulepar float tsp_5 := 1.0;
modulepar bitstring mpbs1 := '110'B;
modulepar bitstring mpbs2 := '1'B;
modulepar bitstring tsp_bs1 := '110'B;
modulepar bitstring tsp_bs2 := '1'B;
modulepar hexstring mphs1 := '3CC'H;
modulepar hexstring mphs2 := '12AA'H;
modulepar hexstring tsp_hs1 :='3CC'H;
modulepar hexstring tsp_hs2 := '12AA'H;
modulepar octetstring mpos1 := 'A0A0'O;
modulepar octetstring mpos2 := '7FFF'O;
modulepar octetstring tsp_os1 := 'A0A0'O;
modulepar octetstring tsp_os2 := '7FFF'O;
modulepar charstring mpcs1 := "abc";
modulepar charstring mpcs2 := "def";
modulepar charstring mpcs3 := "ghi";
modulepar charstring tsp_cs1 := "abc";
modulepar charstring tsp_cs2 := "def";
modulepar charstring tsp_cs3 := "ghi";
modulepar universal charstring mpucs1 := "noquads";
modulepar universal charstring mpucs2 := "x" & char(0, 0, 1, 113) & "x" & char(0, 0, 1, 97) & "x";
modulepar universal charstring tsp_ucs1 := "noquads";
modulepar universal charstring tsp_ucs2 := "x" & char(0, 0, 1, 113) & "x" & char(0, 0, 1, 97) & "x";
modulepar boolean mpb1 := true;
modulepar boolean mpb2 := false;
modulepar boolean tsp_b1 := true;
modulepar boolean tsp_b2 := false;
modulepar objid mpobjid1 := objid { 1 1 7 };
modulepar objid mpobjid2;
modulepar objid tsp_objid1 := objid { 1 1 7 };
modulepar objid tsp_objid2;
modulepar verdicttype mpvt1 := pass;
modulepar verdicttype mpvt2 := fail;
modulepar verdicttype tsp_vt1 := pass;
modulepar verdicttype tsp_vt2 := fail;
modulepar CT mpcomp1 := null;
modulepar CT mpcomp2;
modulepar CT tsp_cotsp_1 := null;
modulepar CT tsp_cotsp_2;
modulepar default mpdef1 := null;
modulepar default mpdef2;
modulepar default tsp_def1 := null;
modulepar default tsp_def2;
modulepar Size mpenum1 := Small;
modulepar Size mpenum2;
modulepar Size tsp_enum1 := Small;
modulepar Size tsp_enum2;
modulepar IntList mplist1 := { };
modulepar IntList mplist2 := { 1, 2 };
modulepar IntList tsp_list1 := { };
modulepar IntList tsp_list2 := { 1, 2 };
modulepar Rec mprec1 := { 10, "yyyy" };
modulepar Rec mprec2 := { num := 3, str := omit };
modulepar Rec mprec3;
modulepar Rec tsp_rec1 := { 10, "yyyy" };
modulepar Rec tsp_rec2 := { num := 3, str := omit };
modulepar Rec tsp_rec3;
modulepar EmptyRec mpemptyrec1 := {};
modulepar EmptyRec mpemptyrec2;
modulepar EmptyRec tsp_emptyrec1 := {};
modulepar EmptyRec tsp_emptyrec2;
modulepar Uni mpuni1 := { ival := 2 };
modulepar Uni mpuni2 := { bval := true };
modulepar Uni mpuni3;
modulepar Uni tsp_uni1 := { ival := 2 };
modulepar Uni tsp_uni2 := { bval := true };
modulepar Uni tsp_uni3;
modulepar TwoStrings mparray1 := { "abc", "def" };
modulepar TwoStrings mparray2 := { "xy", "yx" };
modulepar TwoStrings tsp_array1 := { "abc", "def" };
modulepar TwoStrings tsp_array2 := { "xy", "yx" };
modulepar template integer mptint1 := 7;
modulepar template integer mptint2 := (3..6) ifpresent;
modulepar template integer tsp_tint1 := 7;
modulepar template integer tsp_tint2 := (3..6) ifpresent;
modulepar template float mptf1 := 33.33;
modulepar template float mptf2 := (33.0..66.0);
modulepar template float tsp_tf1 := 33.33;
modulepar template float tsp_tf2 := (33.0..66.0);
modulepar template charstring mptcs1 := ("a".."z");
modulepar template charstring mptcs2 := "abc";
modulepar template charstring mptcs3 := pattern "ab???x";
modulepar template charstring tsp_tcs1 := ("a".."z");
modulepar template charstring tsp_tcs2 := "abc";
modulepar template charstring tsp_tcs3 := pattern "ab???x";
modulepar template universal charstring mptucs1 := (char(0,0,1,97)..char(0,0,1,113)) length (2);
modulepar template universal charstring mptucs2 := "abc" & char(0,0,1,113) & "cba";
modulepar template universal charstring mptucs3;
modulepar template universal charstring tsp_tucs1 := (char(0,0,1,97)..char(0,0,1,113)) length (2);
modulepar template universal charstring tsp_tucs2 := "abc" & char(0,0,1,113) & "cba";
modulepar template universal charstring tsp_tucs3;
modulepar template bitstring mptbs1 := '1010'B;
modulepar template bitstring mptbs2 := * length (3..6);
modulepar template bitstring mptbs3 := '11??00'B;
modulepar template bitstring tsp_tbs1 := '1010'B;
modulepar template bitstring tsp_tbs2 := * length (3..6);
modulepar template bitstring tsp_tbs3 := '11??00'B;
modulepar template hexstring mpths1 := 'AB21'H;
modulepar template hexstring mpths2 := ? length (8);
modulepar template hexstring mpths3 := 'DE*555'H;
modulepar template hexstring tsp_ths1 := 'AB21'H;
modulepar template hexstring tsp_ths2 := ? length (8);
modulepar template hexstring tsp_ths3 := 'DE*555'H;
modulepar template octetstring mptos1 := '00'O;
modulepar template octetstring mptos2 := omit;
modulepar template octetstring mptos3 := 'A0*'O length (1..5);
modulepar template octetstring tsp_tos1 := '00'O;
modulepar template octetstring tsp_tos2 := omit;
modulepar template octetstring tsp_tos3 := 'A0*'O length (1..5);
modulepar template boolean mptb1 := true;
modulepar template boolean mptb2 := false;
modulepar template boolean tsp_tb1 := true;
modulepar template boolean tsp_tb2 := false;
modulepar template CT mptcomp1 := (null, mtc, system);
modulepar template CT mptcomp2;
modulepar template CT tsp_tcomp1 := (null, mtc, system);
modulepar template CT tsp_tcomp2;
modulepar template default mptdef1 := null;
modulepar template default mptdef2;
modulepar template default tsp_tdef1 := null;
modulepar template default tsp_tdef2;
modulepar template verdicttype mptvt1 := none;
modulepar template verdicttype mptvt2 := (pass, fail, error);
modulepar template verdicttype mptvt3;
modulepar template verdicttype tsp_tvt1 := none;
modulepar template verdicttype tsp_tvt2 := (pass, fail, error);
modulepar template verdicttype tsp_tvt3;
modulepar template Size mptenum1 := *;
modulepar template Size mptenum2 := (Small, Large);
modulepar template Size mptenum3;
modulepar template Size tsp_tenum1 := *;
modulepar template Size tsp_tenum2 := (Small, Large);
modulepar template Size tsp_tenum3;
modulepar template objid mptobjid1 := ?;
modulepar template objid mptobjid2 := (objid { 1 2 3 }, objid { 0 0 0 1 });