Commit 36843b8e authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent ae909704
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.8, Ensure that template(omit) is rejected with valuelist.
 ** @purpose  1:15.8, Ensure that ...
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_1508_TemplateRestrictions_002 {
module NegSem_1508_TemplateRestrictions_005 {

type record ExampleType {
	integer a,
+36 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.8, Ensure that the assignment of a template with omit as value can be assigned to a template with omit restriction.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1508_TemplateRestrictions_001 {

type component GeneralComp { }

type record ExampleType {
	integer a,
	boolean b optional
}

template(omit) ExampleType exampleOmit := omit;

testcase TC_Sem_1508_TemplateRestrictions_001() 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_001());
}


}
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.8, Ensure that a templat(value) with an omitted optional field 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(value) ExampleType exampleValueOptional := {1, omit};

testcase TC_Sem_1508_TemplateRestrictions_002() runs on GeneralComp {
	var template(omit) ExampleType v_omit;
	
	v_omit := exampleValueOptional;
	
	if (match(v_omit,{1, omit})) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1508_TemplateRestrictions_002());
}


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

module Sem_1508_TemplateRestrictions_003 {

type component GeneralComp { }

type record ExampleType {
	integer a,
	boolean b optional
}

template(present) ExampleType examplePresent := {1, ?};

testcase TC_Sem_1508_TemplateRestrictions_003() runs on GeneralComp {
	var template(value) ExampleType v_present;
	
	v_present := examplePresent;
	
	if (match(v_present, {1,?})) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1508_TemplateRestrictions_003());
}


}
 No newline at end of file