Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
aa4c17e9
Commit
aa4c17e9
authored
Mar 26, 2018
by
Maxime Perrotin
Browse files
Augment the test case to exhibit several bugs
parent
54a6933f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/regression/test-shadowing/og.pr
View file @
aa4c17e9
...
...
@@ -18,25 +18,31 @@ system og;
state NestedState;
substructure
out (getOut);
/* CIF TEXT (80, 232), (366,
42
) */
/* CIF TEXT (80, 232), (366,
83
) */
-- Declare a variable with the same name as the level above
dcl toto MySeq := { a FALSE, b 2 };
-- Declare a non-shadowing variable
dcl tutu MySeq := { a TRUE, b 8 };
/* CIF ENDTEXT */
/* CIF START (747, 207), (70, 35) */
START;
/* CIF PROCEDURECALL (565, 262), (433, 35) */
call writeln ('Entering state with ', toto.a, toto.b, ' (should be FALSE 2)' );
/* CIF task (734, 317), (95, 35) */
task toto := toto;
/* CIF PROCEDURECALL (577, 372), (410, 35) */
/* CIF task (733, 317), (98, 38) */
task toto := toto,
tutu := tutu;
/* CIF PROCEDURECALL (577, 375), (410, 35) */
call writeln ('Value should be the same: ', toto.a, toto.b);
/* CIF task (705, 4
27
), (153, 53) */
/* CIF task (705, 4
30
), (153, 53) */
task toto.a := TRUE,
toto.b := 3,
toto := { a FALSE, b 4 };
/* CIF PROCEDURECALL (577, 500), (410, 35) */
/* CIF task (705, 503), (153, 53) */
task tutu.a := TRUE;
/* CIF PROCEDURECALL (577, 571), (410, 35) */
call writeln ('Value should be (FALSE 4) : ', toto.a, toto.b);
/* CIF return (764,
555
), (35, 35) */
/* CIF return (764,
626
), (35, 35) */
return getOut;
endsubstructure;
/* CIF TEXT (57, 58), (287, 140) */
...
...
@@ -57,7 +63,7 @@ toto := { a FALSE, b 4 };
state wait;
/* CIF input (457, 282), (105, 35) */
input doSomething;
/* CIF task (43
5
, 337), (150, 35) */
/* CIF task (43
4
, 337), (150, 35) */
task toto := { a TRUE, b 1 };
/* CIF NEXTSTATE (455, 392), (109, 35) */
NEXTSTATE NestedState;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment