Commit 4f040312 authored by zeiss's avatar zeiss
Browse files

No commit message

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

module Sem_1508_TemplateRestrictions_002 {
module Sem_1508_TemplateRestrictions_004 {

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;
testcase TC_Sem_1508_TemplateRestrictions_004() runs on GeneralComp {
	var template(value) integer v_value;
	
	v_omit := exampleValueOptional;
	v_value := 20
	
	if (match(v_omit,{1, omit})) {
	if (valueof(v_value) == 20) {
		setverdict(pass);
	} else {
		setverdict(fail);
@@ -29,7 +22,7 @@ testcase TC_Sem_1508_TemplateRestrictions_002() runs on GeneralComp {
}

control{
    execute(TC_Sem_1508_TemplateRestrictions_002());
    execute(TC_Sem_1508_TemplateRestrictions_004());
}


+3 −3
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1508_TemplateRestrictions_003 {
module Sem_1508_TemplateRestrictions_005 {

type component GeneralComp { }

@@ -16,7 +16,7 @@ type record ExampleType {

template(value) ExampleType exampleValue := {1, true};

testcase TC_Sem_1508_TemplateRestrictions_003() runs on GeneralComp {
testcase TC_Sem_1508_TemplateRestrictions_005() runs on GeneralComp {
	var template(value) ExampleType v_value;
	
	v_value := exampleValue;
@@ -29,7 +29,7 @@ testcase TC_Sem_1508_TemplateRestrictions_003() runs on GeneralComp {
}

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