Commit ef5cdb41 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent 7a5ed762
Loading
Loading
Loading
Loading
+35
Changes for 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_001.ttcn: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that assignment of an anyvalue on the right hand side yields an anyvalue in the context of record of.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_150603_ReferencingRecordOfAndSetElements_001 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_001() runs on GeneralComp {
	var template RoI m_one;
	var template RoI m_two;
	
	m_one := {0,?,2};
	m_two := {0,1,2};
	m_two[1] := m_one[1];
	
	if (match("?",m_two[1])) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_001());
}



}
 No newline at end of file
+38
Changes for 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_002.ttcn: 38 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_150603_ReferencingRecordOfAndSetElements_002 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_002() runs on GeneralComp {
	var template RoI m_one;
	
	m_one := ?;
	m_one[2] := 2;
	// assignment should yield {?,?,2,*}
	
	if (match("?",m_one[0]) and
		match("?",m_one[1]) and
		match(2,m_one[2]) and
		match("*",m_one[3])
	) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_002());
}



}
 No newline at end of file
+42
Changes for 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_003.ttcn: 42 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly in two subsequent assignments.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_150603_ReferencingRecordOfAndSetElements_003 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_003() runs on GeneralComp {
	var template RoI m_one;
	
	m_one := ?;
	m_one[2] := 2;
	// assignment should yield {?,?,2,*}
	m_one[4] := 3;
	// assignment should yield {?,?,2,?,3,*}
	
	if (match("?",m_one[0]) and
		match("?",m_one[1]) and
		match(2,m_one[2]) and
		match("?",m_one[3]) and
		match(3,m_one[4]) and
		match("*",m_one[5])
	) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_003());
}



}
 No newline at end of file
+36
Changes for 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_004.ttcn: 36 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly when the first element is changed.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_150603_ReferencingRecordOfAndSetElements_004 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_004() runs on GeneralComp {
	var template RoI m_one;
	
	m_one := ?;
	m_one[0] := 2;
	// assignment should yield {2,*}
	
	if (match("2",m_one[0]) and
		match("*",m_one[1]) 
	) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_004());
}



}
 No newline at end of file