Commit bf7b3df1 authored by zeiss's avatar zeiss
Browse files

No commit message

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

module Sem_1508_TemplateRestrictions_005 {
module Sem_1508_TemplateRestrictions_007 {

type component GeneralComp { }

testcase TC_Sem_1508_TemplateRestrictions_005() runs on GeneralComp {
	var template(present) integer v_present;
type record ExampleType {
	integer a,
	boolean b optional
}

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

testcase TC_Sem_1508_TemplateRestrictions_007() runs on GeneralComp {
	var template(present) ExampleType v_present;
	
	v_present := 20
	v_present := exampleOmit;
	
	if (valueof(v_present) == 20) {
	if (match(v_present, {1,omit})) {
		setverdict(pass);
	} else {
		setverdict(fail);
@@ -22,7 +29,7 @@ testcase TC_Sem_1508_TemplateRestrictions_005() runs on GeneralComp {
}

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


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

module Sem_1508_TemplateRestrictions_005 {
module Sem_1508_TemplateRestrictions_008 {

type component GeneralComp { }

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

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

testcase TC_Sem_1508_TemplateRestrictions_005() runs on GeneralComp {
testcase TC_Sem_1508_TemplateRestrictions_008() runs on GeneralComp {
	var template(present) integer v_present;
	
	v_present := 20
@@ -29,7 +29,7 @@ testcase TC_Sem_1508_TemplateRestrictions_005() runs on GeneralComp {
}

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