Commit 8004df0b authored by kovacsa's avatar kovacsa
Browse files

Chapter 19 update

parent 11ce8595
......@@ -4,12 +4,12 @@
** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Sem_1903_select_case_statement_statement_001 {
module Sem_1903_select_case_statement_001 {
type component GeneralComp {
}
testcase TC_Sem_1903_select_case_statement_statement_001 () runs on GeneralComp{
testcase TC_Sem_1903_select_case_statement_001 () runs on GeneralComp{
var integer v_i:=2;
select (v_i) {
......@@ -31,7 +31,7 @@ testcase TC_Sem_1903_select_case_statement_statement_001 () runs on GeneralComp{
control{
execute(TC_Sem_1903_select_case_statement_statement_001());
execute(TC_Sem_1903_select_case_statement_001());
}
......
......@@ -4,12 +4,12 @@
** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Sem_1903_select_case_statement_statement_002 {
module Sem_1903_select_case_statement_002 {
type component GeneralComp {
}
testcase TC_Sem_1903_select_case_statement_statement_002 () runs on GeneralComp{
testcase TC_Sem_1903_select_case_statement_002 () runs on GeneralComp{
var integer v_i:=5;
select (v_i) {
......@@ -31,7 +31,7 @@ testcase TC_Sem_1903_select_case_statement_statement_002 () runs on GeneralComp{
control{
execute(TC_Sem_1903_select_case_statement_statement_002());
execute(TC_Sem_1903_select_case_statement_002());
}
......
......@@ -4,12 +4,12 @@
** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Sem_1903_select_case_statement_statement_003 {
module Sem_1903_select_case_statement_003 {
type component GeneralComp {
}
testcase TC_Sem_1903_select_case_statement_statement_003 () runs on GeneralComp{
testcase TC_Sem_1903_select_case_statement_003 () runs on GeneralComp{
var integer v_i:=5;
setverdict(pass);
......@@ -29,7 +29,7 @@ testcase TC_Sem_1903_select_case_statement_statement_003 () runs on GeneralComp{
control{
execute(TC_Sem_1903_select_case_statement_statement_003());
execute(TC_Sem_1903_select_case_statement_003());
}
......
......@@ -4,12 +4,12 @@
** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Sem_1903_select_case_statement_statement_004 {
module Sem_1903_select_case_statement_004 {
type component GeneralComp {
}
testcase TC_Sem_1903_select_case_statement_statement_004 () runs on GeneralComp{
testcase TC_Sem_1903_select_case_statement_004 () runs on GeneralComp{
var integer v_i:=2;
select (v_i) {
......@@ -31,7 +31,7 @@ testcase TC_Sem_1903_select_case_statement_statement_004 () runs on GeneralComp{
control{
execute(TC_Sem_1903_select_case_statement_statement_004());
execute(TC_Sem_1903_select_case_statement_004());
}
......
/***************************************************
** @author STF 409
** @version 0.0.1
** @purpose 1:19.4, Ensure that the IUT properly evaluates for statements
** @verdict pass reject
***************************************************/
module NegSem_1904_for_statement_001 {
type component GeneralComp {
}
testcase TC_NegSem_1904_for_statement_001 () runs on GeneralComp{
for(var integer v_i:=1; v_i<10; v_i:= j+1) {
}
if(v_i==10) { setverdict(pass); } //v_i is not accessible from outside the loop
}
control{
execute(TC_NegSem_1904_for_statement_001());
}
}
/***************************************************
** @author STF 409
** @version 0.0.1
** @purpose 1:19.4, Ensure that the IUT properly evaluates for statements
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Sem_1904_for_statement_001 {
type component GeneralComp {
}
testcase TC_Sem_1904_for_statement_001 () runs on GeneralComp{
var integer v_i;
var integer v_j:=1;
for(v_i:=1; v_i<10; v_i:= v_i+1) {
v_j:=v_j+1;
}
if( (v_i==10) & (v_j==10) ) { setverdict(pass); }
else { setverdict(fail); }
}
control{
execute(TC_Sem_1904_for_statement_001());
}
}
/***************************************************
** @author STF 409
** @version 0.0.1
** @purpose 1:19.4, Ensure that the IUT properly evaluates for statements
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Sem_1904_for_statement_002 {
type component GeneralComp {
}
testcase TC_Sem_1904_for_statement_002 () runs on GeneralComp{
var integer v_i;
for(var integer v_i:=1; v_i<10; v_i:= j+1) {
if(v_i==5) { break; }
}
if(v_i==5) { setverdict(pass); }
else { setverdict(fail); }
}
control{
execute(TC_Sem_1904_for_statement_002());
}
}
Supports Markdown
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