Commit c85ec98a authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent 5922e4fc
Loading
Loading
Loading
Loading
+4 −6
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 value can be assigned to a template(omit) variable.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

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

template(omit) ExampleType exampleOmit := omit;

testcase TC_Sem_1508_TemplateRestrictions_001() runs on GeneralComp {
	var template(omit) ExampleType v_omit;
	var template(omit) integer v_omit;
	
	v_omit := exampleOmit;
	v_omit := 20;
	
	if (valueof(v_omit) == omit) {
	if (valueof(v_omit) == 20) {
		setverdict(pass);
	} else {
		setverdict(fail);
+8 −8
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.8, Ensure that a template(value) can be assigned to a template(value) variable.
 ** @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_003 {
module Sem_1508_TemplateRestrictions_001 {

type component GeneralComp { }

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

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

testcase TC_Sem_1508_TemplateRestrictions_003() runs on GeneralComp {
	var template(value) ExampleType v_value;
testcase TC_Sem_1508_TemplateRestrictions_001() runs on GeneralComp {
	var template(omit) ExampleType v_omit;
	
	v_value := exampleValue;
	v_omit := exampleOmit;
	
	if (match(v_value, {1,true})) {
	if (valueof(v_omit) == omit) {
		setverdict(pass);
	} else {
		setverdict(fail);
@@ -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_001());
}


+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 templat(value) can be assigned to a template(omit) variable.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1508_TemplateRestrictions_004 {
module Sem_1508_TemplateRestrictions_002 {

type component GeneralComp { }

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

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


+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(value) can be assigned to a template(value) variable.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1508_TemplateRestrictions_005 {
module Sem_1508_TemplateRestrictions_003 {

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(value) ExampleType exampleValue := {1, true};

testcase TC_Sem_1508_TemplateRestrictions_003() runs on GeneralComp {
	var template(value) ExampleType v_value;
	
	v_present := 20
	v_value := exampleValue;
	
	if (valueof(v_present) == 20) {
	if (match(v_value, {1,true})) {
		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_003());
}


+7 −14
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.8, Ensure that a template(value) can be assigned to a template(present) 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_006 {
module Sem_1508_TemplateRestrictions_004 {

type component GeneralComp { }

type record ExampleType {
	integer a,
	boolean b optional
}

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

testcase TC_Sem_1508_TemplateRestrictions_006() runs on GeneralComp {
	var template(present) integer v_present;
testcase TC_Sem_1508_TemplateRestrictions_004() runs on GeneralComp {
	var template(value) integer v_value;
	
	v_present := 20
	v_value := 20
	
	if (valueof(v_present) == 20) {
	if (valueof(v_value) == 20) {
		setverdict(pass);
	} else {
		setverdict(fail);
@@ -29,7 +22,7 @@ testcase TC_Sem_1508_TemplateRestrictions_006() runs on GeneralComp {
}

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


Loading