Commit 236b7419 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Additional tests in for loops with enumerated types

parent fde3cf2b
...@@ -9,6 +9,9 @@ VariableString ::= OCTET STRING (SIZE (1..10)) ...@@ -9,6 +9,9 @@ VariableString ::= OCTET STRING (SIZE (1..10))
FixedString ::= OCTET STRING (SIZE (5)) FixedString ::= OCTET STRING (SIZE (5))
SeqBool ::= SEQUENCE (SIZE(1..5)) OF BOOLEAN SeqBool ::= SEQUENCE (SIZE(1..5)) OF BOOLEAN
SeqBoolFix ::= SEQUENCE (SIZE(2)) OF BOOLEAN
SeqEnum ::= SEQUENCE (SIZE(1..5)) OF ENUMERATED { hello, world }
SeqEnumFix ::= SEQUENCE (SIZE(2)) OF ENUMERATED { hello, world }
END END
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
PROCESS orchestrator PROCESS orchestrator
/* CIF COMMENT (405, 192), (71, 35) */ /* CIF COMMENT (405, 192), (71, 35) */
COMMENT 'Hello'; COMMENT 'Hello';
/* CIF TEXT (89, 94), (293, 200) */ /* CIF TEXT (89, 94), (293, 203) */
dcl seq tastE_Peek_id_list; dcl seq tastE_Peek_id_list;
dcl fixed FixedString := 'Hello'; dcl fixed FixedString := 'Hello';
...@@ -10,34 +10,52 @@ dcl fixed FixedString := 'Hello'; ...@@ -10,34 +10,52 @@ dcl fixed FixedString := 'Hello';
dcl variable VariableString := 'Hello'; dcl variable VariableString := 'Hello';
dcl seqboolean SeqBool := { true, false }; dcl seqboolean SeqBool := { true, false };
dcl seqbool2 SeqBoolFix := { true, false };
dcl seqen SeqEnum := { hello, world };
dcl seqen2 SeqEnumFix := { hello, world };
/* CIF ENDTEXT */ /* CIF ENDTEXT */
/* CIF START (428, 223), (100, 45) */ /* CIF START (428, 223), (100, 45) */
START; START;
/* CIF TASK (397, 283), (162, 53) */ /* CIF TASK (396, 283), (164, 53) */
TASK for x in seqen:
call writeln(num(x));
endfor;
/* CIF TASK (396, 351), (164, 53) */
TASK for x in seqen2:
call writeln(num(x));
endfor;
/* CIF TASK (397, 419), (162, 53) */
TASK for x in seqboolean: TASK for x in seqboolean:
call writeln(x); call writeln(x);
endfor; endfor
/* CIF TASK (367, 351), (222, 35) */ /* CIF COMMENT (579, 428), (168, 38) */
TASK seqboolean := not seqboolean; COMMENT 'FOR with a basic type';
/* CIF TASK (397, 401), (162, 53) */ /* CIF TASK (367, 487), (222, 35) */
TASK seqboolean := not seqboolean
/* CIF COMMENT (609, 487), (279, 35) */
COMMENT 'check NOT on a SEQUENCE of BOOLEAN';
/* CIF TASK (397, 537), (162, 53) */
TASK for x in seqboolean: TASK for x in seqboolean:
call writeln(x); call writeln(x);
endfor; endfor;
/* CIF TASK (415, 469), (126, 38) */ /* CIF TASK (415, 605), (126, 38) */
TASK fixed := 'hello'; TASK fixed := 'hello';
/* CIF TASK (403, 522), (149, 35) */ /* CIF TASK (403, 658), (149, 35) */
TASK variable := 'HELLO'; TASK variable := 'HELLO';
/* CIF PROCEDURECALL (390, 572), (176, 35) */ /* CIF PROCEDURECALL (390, 708), (176, 35) */
CALL writeln(variable // '!!!'); CALL writeln(variable // '!!!');
/* CIF PROCEDURECALL (342, 622), (272, 35) */ /* CIF PROCEDURECALL (342, 758), (272, 35) */
CALL writeln(variable // variable // variable); CALL writeln(variable // variable // variable);
/* CIF TASK (432, 672), (91, 35) */ /* CIF TASK (432, 808), (91, 35) */
TASK seq := {1}; TASK seq := {1};
/* CIF TASK (401, 722), (153, 35) */ /* CIF TASK (401, 858), (153, 35) */
TASK seq := {1} // {2} // {3}; TASK seq := {1} // {2} // {3};
/* CIF TASK (392, 772), (172, 35) */ /* CIF TASK (392, 908), (172, 35) */
TASK seq := seq // {2} // {1}; TASK seq := seq // {2} // {1};
/* CIF NEXTSTATE (419, 822), (118, 50) */ /* CIF NEXTSTATE (419, 958), (118, 50) */
NEXTSTATE Wait_for_GUI; NEXTSTATE Wait_for_GUI;
/* CIF STATE (423, 163), (118, 50) */ /* CIF STATE (423, 163), (118, 50) */
STATE Wait_for_GUI; STATE Wait_for_GUI;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment