Commit 9300d3e0 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent ba9eefb4
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that referencing an element within a value list causes an error in the context of record of.
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_150603_ReferencingRecordOfAndSetElements_001 {

type component GeneralComp { }

type record of integer RoI;
type record of RoI RoRoI;

testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_001() runs on GeneralComp {
	var template RoI m_one;
	var template RoRoI m_two;
	
	m_two := ({},{0},{0,0},{0,0,0});
	m_one := m_two[0]; // shall cause an error as we access a value list

	setverdict(fail);
}

control{
    execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_001());
}



}
 No newline at end of file
+30 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that access to omit fields in the context of record of is rejected.
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_150603_ReferencingRecordOfAndSetElements_002 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_002() runs on GeneralComp {
	var template RoI m_one;
	var integer v_test;
	
	m_one := {0,omit,1,2};
	v_test := m_one[1]; // shall cause an error as element one is an omit field

	setverdict(fail);
}

control{
    execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_002());
}



}
 No newline at end of file
+30 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that anyvalueornone fields in the context of record of is rejected.
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_150603_ReferencingRecordOfAndSetElements_003 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_003() runs on GeneralComp {
	var template RoI m_one;
	var integer v_test;
	
	m_one := {0,*,1,2};
	v_test := m_one[1]; // shall cause an error as element one is an anyvalueornone field

	setverdict(fail);
}

control{
    execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_003());
}



}
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that complement value lists in the context of record of are rejected.
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_150603_ReferencingRecordOfAndSetElements_004 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_004() runs on GeneralComp {
	var template RoI m_one;
	var integer v_test;
	
	m_one := {0,complement(1,3,5),1,2};
	v_test := m_one[1]; // shall cause an error as element one is a complement list

	setverdict(fail);
}

control{
    execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_004());
}

}
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.6.3, Ensure that subset in the context of record of are rejected.
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_150603_ReferencingRecordOfAndSetElements_005 {

type component GeneralComp { }

type record of integer RoI;

testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_005() runs on GeneralComp {
	var template RoI m_one;
	var integer v_test;
	
	m_one := {0,subset(1,3,5),1,2};
	v_test := m_one[1]; // shall cause an error as element one is a subset

	setverdict(fail);
}

control{
    execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_005());
}

}
 No newline at end of file
Loading