Commit ef5cdb41 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent 7a5ed762
Loading
Loading
Loading
Loading
+35 −0
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 −0
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 −0
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 −0
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