Commit 2ab7ca88 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent a07d9eeb
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:26, Ensure that parameters are passed correctly into the test case.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_2601_ExecuteStatement_001 {

type component GeneralComp { }

testcase t_myTestCase(integer p_value) runs on GeneralComp {
	if (p_value == 20) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control {
	var integer v_test := 20;
	execute(t_myTestCase(v_test));
}

}
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:26, Ensure that multiple parameters of different types are passed correctly into the test case.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_2601_ExecuteStatement_002 {

type component GeneralComp { }

testcase t_myTestCase(integer p_value, charstring p_string, boolean p_bool) runs on GeneralComp {
	if ((p_value == 20) and
	    (p_string == "hello") and
	    (p_bool == true) 
	   ){
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control {
	var integer v_test := 20;
	execute(t_myTestCase(v_test, "hello", true));
}

}
 No newline at end of file
+22 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:26, Ensure that the timeout specified with the execute statement is respected.
 ** @verdict  pass accept, ttcn3verdict:error
 *****************************************************************/

module Sem_2601_ExecuteStatement_003 {

type component GeneralComp { }

testcase t_myTestCase() runs on GeneralComp {
	alt { // this alt is intentionally blocking!
	}
	setverdict(pass);
}

control {
	execute(t_myTestCase(), 20E-3); // let the testcase timeout after 20ms seconds
}

}
 No newline at end of file
+31 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:26, Ensure that the verdict returned from the first test case to the control part is correct (in this case, none).
 ** @verdict  pass accept, ttcn3verdict:fail
 *****************************************************************/

module Sem_2601_ExecuteStatement_004 {

type component GeneralComp { }

testcase t_myTestCaseOne() runs on GeneralComp {
	setverdict(none);
}

testcase t_myTestCaseTwo(verdicttype p_verdict) runs on GeneralComp {
	if (p_verdict == none) {
		setverdict(fail);
	} else {
		setverdict(pass);
	}
}

control {
	var verdicttype v_result;
	
	v_result := execute(t_myTestCaseOne());
	execute(t_myTestCaseTwo(v_result));
}

}
 No newline at end of file
+31 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:26, Ensure that the verdict returned from the first test case to the control part is correct (in this case, pass).
 ** @verdict  pass accept, ttcn3verdict:fail
 *****************************************************************/

module Sem_2601_ExecuteStatement_005 {

type component GeneralComp { }

testcase t_myTestCaseOne() runs on GeneralComp {
	setverdict(pass);
}

testcase t_myTestCaseTwo(verdicttype p_verdict) runs on GeneralComp {
	if (p_verdict == pass) {
		setverdict(fail);
	} else {
		setverdict(pass);
	}
}

control {
	var verdicttype v_result;
	
	v_result := execute(t_myTestCaseOne());
	execute(t_myTestCaseTwo(v_result));
}

}
 No newline at end of file
Loading