Commit 4ad402c1 authored by stancakapost's avatar stancakapost
Browse files

No commit message

No commit message
parent dd302fd0
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 409
 ** @version  $Rev: 21 $
 ** @purpose  1:6.2, Invalid recursive union type definition causing an error
 ** @verdict  pass reject
 ***************************************************/
module NegSyn_0602_TopLevel_001 {
    // In case of union types, to avoid infinite recursion, at least one of the alternatives shall not reference its own type.
	type union MyUnion {
		MyUnion choice1,
		MyUnion choice2
	}
}
 No newline at end of file
+14 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 409
 ** @version  $Rev: 21 $
 ** @purpose  1:6.2, Invalid recursive record type definition causing an error
 ** @verdict  pass reject
 ***************************************************/
module NegSyn_0602_TopLevel_002 {
    // In case of record and set types, to avoid infinite recursion, fields referencing to its own type, shall be optional.
	type record MyRecord {
		integer field1,
		MyRecord field2,
		integer field3
	}
}
 No newline at end of file
+18 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 409
 ** @version  $Rev: 21 $
 ** @purpose  1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context.
 ** @verdict  pass reject
 ***************************************************/
module NegSyn_0602_TopLevel_003 {
    type record MyRecord {
        integer field1,
        charstring field2 optional,
        float field3
    }
    const MyRecord c_rec := {
        field1 := 5,
        "hi", // combined value list and assignment notation not allowed in the same (immediate) context.
        field3 := 3.14
    };
}
 No newline at end of file
+18 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 409
 ** @version  $Rev: 21 $
 ** @purpose  1:6.2, The omit keyword shall not be used for mandatory fields.
 ** @verdict  pass reject
 ***************************************************/
module NegSyn_0602_TopLevel_004 {
	type record MyRecord {
		integer field1,
		MyRecord field2 optional,
		integer field3
	}
    const MyRecord c_rec := {
        field1 := 5,
        field2 := -,
        field3 := - // not optional
    };
}
 No newline at end of file
+18 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 409
 ** @version  $Rev: 21 $
 ** @purpose  1:6.2, The omit keyword shall not be used for mandatory fields.
 ** @verdict  pass reject
 ***************************************************/
module NegSyn_0602_TopLevel_005 {
	type record MyRecord {
		integer field1,
		MyRecord field2 optional,
		integer field3
	}
    const MyRecord c_rec := {
        field1 := 5,
        field2 := -,
        field3 := - // not optional
    };
}
 No newline at end of file
Loading