Commit ac3e68a3 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent c85ec98a
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.8, Ensure that a template(omit) can be assigned to a template(omit) variable.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1508_TemplateRestrictions_002 {

type component GeneralComp { }

type record ExampleType {
	integer a,
	boolean b optional
}

template(omit) ExampleType exampleOmit := omit;

testcase TC_Sem_1508_TemplateRestrictions_002() runs on GeneralComp {
	var template(omit) ExampleType v_omit;
	
	v_omit := exampleOmit;
	
	if (valueof(v_omit) == omit) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1508_TemplateRestrictions_002());
}


}
 No newline at end of file
+7 −7
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.8, Ensure that a template(omit) can be assigned to a template(omit) variable.
 ** @purpose  1:15.8, Ensure that a templat(value) can be assigned to a template(omit) variable.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1508_TemplateRestrictions_001 {
module Sem_1508_TemplateRestrictions_003 {

type component GeneralComp { }

@@ -14,14 +14,14 @@ type record ExampleType {
	boolean b optional
}

template(omit) ExampleType exampleOmit := omit;
template(value) ExampleType exampleValueOptional := {1, omit};

testcase TC_Sem_1508_TemplateRestrictions_001() runs on GeneralComp {
testcase TC_Sem_1508_TemplateRestrictions_003() runs on GeneralComp {
	var template(omit) ExampleType v_omit;
	
	v_omit := exampleOmit;
	v_omit := exampleValueOptional;
	
	if (valueof(v_omit) == omit) {
	if (match(v_omit,{1, omit})) {
		setverdict(pass);
	} else {
		setverdict(fail);
@@ -29,7 +29,7 @@ testcase TC_Sem_1508_TemplateRestrictions_001() runs on GeneralComp {
}

control{
    execute(TC_Sem_1508_TemplateRestrictions_001());
    execute(TC_Sem_1508_TemplateRestrictions_003());
}