Skip to content
Snippets Groups Projects
Commit eb633a38 authored by balaskoa's avatar balaskoa
Browse files

New testcases to modulepar hexstring part


Signed-off-by: default avatarbalaskoa <Jeno.Balasko@ericsson.com>
Change-Id: Ic46df0b40a08a8f1e4b76abb2af9566e1ef68a30
parent ec882d61
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,10 @@ type component CT { } ...@@ -18,7 +18,10 @@ type component CT { }
modulepar hexstring tsp_notChangedUninit modulepar hexstring tsp_notChangedUninit
modulepar hexstring tsp_notChangedInit := '12345'H modulepar hexstring tsp_notChangedInit := '12345'H
modulepar hexstring tsp_changedInit := '1'H modulepar hexstring tsp_changedInit := '1'H
modulepar hexstring tsp_changedInitConcat := '1'H modulepar hexstring tsp_changedInitConcat1 := '1'H
modulepar hexstring tsp_changedInitConcat2 := '1'H
modulepar hexstring tsp_changedInitConcat3 := '1'H
type hexstring myhstr0 type hexstring myhstr0
type hexstring myhstr1 length(1) type hexstring myhstr1 length(1)
type hexstring myhstr2 length(0..1) type hexstring myhstr2 length(0..1)
...@@ -307,12 +310,17 @@ testcase tc_hexstrModulepar() runs on CT { ...@@ -307,12 +310,17 @@ testcase tc_hexstrModulepar() runs on CT {
} }
if( tsp_changedInit == '1234567890ABCDEF'H ) {setverdict(pass, tsp_changedInit)} else { setverdict(fail, tsp_changedInit) } if( tsp_changedInit == '1234567890ABCDEF'H ) {setverdict(pass, tsp_changedInit)} else { setverdict(fail, tsp_changedInit) }
if( tsp_changedInitConcat == '12345'H ) { if( tsp_changedInitConcat1 == '12345'H ) {
setverdict(pass, tsp_changedInitConcat) setverdict(pass, tsp_changedInitConcat1)
} else { } else {
setverdict(fail, tsp_changedInitConcat) setverdict(fail, tsp_changedInitConcat1)
}
if( tsp_changedInitConcat2 == '12345'H ) {
setverdict(pass, tsp_changedInitConcat2)
} else {
setverdict(fail, tsp_changedInitConcat2)
} }
} }
testcase tc_hexstrConcat() runs on CT { testcase tc_hexstrConcat() runs on CT {
...@@ -322,6 +330,7 @@ testcase tc_hexstrConcat() runs on CT { ...@@ -322,6 +330,7 @@ testcase tc_hexstrConcat() runs on CT {
if( (x2 & x1) == '23112F'H) {setverdict(pass, x2,x2)} else { setverdict(fail, x1 and4b x2) } if( (x2 & x1) == '23112F'H) {setverdict(pass, x2,x2)} else { setverdict(fail, x1 and4b x2) }
} }
//===== Older === //===== Older ===
function f_hstr1() return myhstr6 { function f_hstr1() return myhstr6 {
return substr(replace(int2hex(0, 1) & int2hex(1, 1), 0, 1, '1'H), 0, 1) return substr(replace(int2hex(0, 1) & int2hex(1, 1), 0, 1, '1'H), 0, 1)
...@@ -352,6 +361,7 @@ testcase hexstrIsvalue() runs on CT{ ...@@ -352,6 +361,7 @@ testcase hexstrIsvalue() runs on CT{
if ( isvalue(hstr0) ) { setverdict(fail); } else { setverdict(pass); }; if ( isvalue(hstr0) ) { setverdict(fail); } else { setverdict(pass); };
if ( isvalue(hstr1) ) { setverdict(pass); } else { setverdict(fail); }; if ( isvalue(hstr1) ) { setverdict(pass); } else { setverdict(fail); };
if ( isvalue(hstr1[0]) ) { setverdict(pass); } else { setverdict(fail); };
if ( isvalue(thstr) ) { setverdict(fail); } else { setverdict(pass); }; if ( isvalue(thstr) ) { setverdict(fail); } else { setverdict(pass); };
thstr := hstr1; thstr := hstr1;
if ( isvalue(thstr) ) { setverdict(pass); } else { setverdict(fail); }; if ( isvalue(thstr) ) { setverdict(pass); } else { setverdict(fail); };
...@@ -359,6 +369,7 @@ testcase hexstrIsvalue() runs on CT{ ...@@ -359,6 +369,7 @@ testcase hexstrIsvalue() runs on CT{
if ( isvalue(thstr) ) { setverdict(fail); } else { setverdict(pass); }; if ( isvalue(thstr) ) { setverdict(fail); } else { setverdict(pass); };
thstr := ('123'H,'124'H); thstr := ('123'H,'124'H);
if ( isvalue(thstr) ) { setverdict(fail); } else { setverdict(pass); }; if ( isvalue(thstr) ) { setverdict(fail); } else { setverdict(pass); };
} }
testcase hexstrIsbound() runs on CT { testcase hexstrIsbound() runs on CT {
...@@ -369,6 +380,7 @@ testcase hexstrIsbound() runs on CT { ...@@ -369,6 +380,7 @@ testcase hexstrIsbound() runs on CT {
if ( isbound(hstr0) ) { setverdict(fail); } else { setverdict(pass); }; if ( isbound(hstr0) ) { setverdict(fail); } else { setverdict(pass); };
if ( isbound(hstr0[0]) ) { setverdict(fail); } else { setverdict(pass); }; if ( isbound(hstr0[0]) ) { setverdict(fail); } else { setverdict(pass); };
if ( isbound(hstr1) ) { setverdict(pass); } else { setverdict(fail); }; if ( isbound(hstr1) ) { setverdict(pass); } else { setverdict(fail); };
if ( isbound(hstr1[0]) ) { setverdict(pass); } else { setverdict(fail); };
if ( isbound(thstr) ) { setverdict(fail); } else { setverdict(pass); }; if ( isbound(thstr) ) { setverdict(fail); } else { setverdict(pass); };
thstr := hstr1; thstr := hstr1;
......
...@@ -10,14 +10,20 @@ ...@@ -10,14 +10,20 @@
# Kovacs, Ferenc # Kovacs, Ferenc
# #
############################################################################### ###############################################################################
[MODULE_PARAMETERS]
tsp_changedInit := '1234567890ABCDEF'H
tsp_changedInitConcat := '123'H
tsp_changedInitConcat := tsp_changedInitConcat & '45'H
[LOGGING] [LOGGING]
Logfile := "hexstrOper.log" Logfile := "hexstrOper.log"
FileMask := LOG_ALL FileMask := LOG_ALL
ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
[MODULE_PARAMETERS]
tsp_changedInit := '1234567890ABCDEF'H
tsp_changedInitConcat1 := '123'H
tsp_changedInitConcat1 := tsp_changedInitConcat1 & '45'H
tsp_changedInitConcat2 := '123'H
tsp_changedInitConcat2 &= '45'H
#This stops the execution but there isn't any feedback:
#tsp_changedInitConcat3 := tsp_changedInitConcat3 length(1)
[EXECUTE] [EXECUTE]
ThexstrOper ThexstrOper
...@@ -10,14 +10,20 @@ ...@@ -10,14 +10,20 @@
# Kovacs, Ferenc # Kovacs, Ferenc
# #
############################################################################### ###############################################################################
[MODULE_PARAMETERS]
tsp_changedInit := '1234567890ABCDEF'H
tsp_changedInitConcat := '123'H
tsp_changedInitConcat &= '45'H
[LOGGING] [LOGGING]
Logfile := "hexstrOper.log" Logfile := "hexstrOper.log"
FileMask := LOG_ALL FileMask := LOG_ALL
ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
[MODULE_PARAMETERS]
tsp_changedInit := '1234567890ABCDEF'H
tsp_changedInitConcat1 := '123'H
tsp_changedInitConcat1 := tsp_changedInitConcat1 & '45'H
tsp_changedInitConcat2 := '123'H
tsp_changedInitConcat2 &= '45'H
#This stops the execution but there isn't any feedback:
#tsp_changedInitConcat3 := tsp_changedInitConcat3 length(1)
[EXECUTE] [EXECUTE]
ThexstrOper ThexstrOper
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment