Commit 5b1f6c7a authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Remove duplicate test in expressions.pr

parent ad599f79
......@@ -23,15 +23,15 @@ DCL bs3 BoolSeqOf;
STATE Wait;
/* CIF INPUT (1, 135), (100, 50) */
INPUT run;
/* CIF TASK (-150, 200), (402, 35) */
/* CIF TASK (-150, 200), (466, 35) */
TASK '------------------------------- Binary expressions -------------------------------';
/* CIF TASK (0, 250), (102, 35) */
/* CIF TASK (32, 250), (102, 35) */
TASK b := true;
/* CIF PROCEDURECALL (-60, 300), (223, 35) */
CALL assert(b and true, 'b and true');
/* CIF PROCEDURECALL (-53, 350), (209, 35) */
/* CIF PROCEDURECALL (-53, 350), (210, 35) */
CALL assert(b or false, 'b or false');
/* CIF PROCEDURECALL (-60, 400), (222, 35) */
/* CIF PROCEDURECALL (-60, 400), (224, 35) */
CALL assert(b xor false, 'b xor false');
/* CIF PROCEDURECALL (-52, 450), (206, 35) */
CALL assert(b => true, 'b => true');
......@@ -125,79 +125,77 @@ DCL bs3 BoolSeqOf;
CALL assert(varSeqOf1 = varSeqOf2, 'varSeqOf1 = varSeqOf2');
/* CIF TASK (-3, 2700), (108, 35) */
TASK s := 'HELLO';
/* CIF PROCEDURECALL (-195, 2750), (492, 35) */
CALL assert(s // s // s = 'HELLOHELLOHELLO', 's // s // s = "HELLOHELLOHELLO"');
/* CIF TASK (-85, 2800), (273, 35) */
/* CIF TASK (-85, 2750), (273, 35) */
TASK bs1 := {false, true, false, true};
/* CIF TASK (-85, 2850), (273, 35) */
/* CIF TASK (-85, 2800), (273, 35) */
TASK bs2 := {false, false, true, true};
/* CIF TASK (-99, 2900), (301, 35) */
/* CIF TASK (-99, 2850), (301, 35) */
TASK bs3 := {false, false, false, true};
/* CIF PROCEDURECALL (-108, 2950), (318, 35) */
/* CIF PROCEDURECALL (-108, 2900), (318, 35) */
CALL assert((bs1 and bs2) = bs3, 'bs1 and bs2 = bs3');
/* CIF TASK (-57, 3000), (217, 35) */
/* CIF TASK (-57, 2950), (217, 35) */
TASK bs3 := {false, true, true, true};
/* CIF PROCEDURECALL (-98, 3050), (299, 35) */
/* CIF PROCEDURECALL (-98, 3000), (299, 35) */
CALL assert((bs1 or bs2) = bs3, 'bs1 or bs2 = bs3');
/* CIF TASK (-60, 3100), (222, 35) */
/* CIF TASK (-60, 3050), (222, 35) */
TASK bs3 := {false, true, true, false};
/* CIF PROCEDURECALL (-105, 3150), (312, 35) */
/* CIF PROCEDURECALL (-105, 3100), (312, 35) */
CALL assert((bs1 xor bs2) = bs3, 'bs1 xor bs2 = bs3');
/* CIF TASK (-57, 3200), (217, 35) */
/* CIF TASK (-57, 3150), (217, 35) */
TASK bs3 := {true, false, true, true};
/* CIF PROCEDURECALL (-102, 3250), (306, 35) */
/* CIF PROCEDURECALL (-102, 3200), (306, 35) */
CALL assert((bs1 => bs2) = bs3, ' bs1 => bs2 = bs3');
/* CIF TASK (-148, 3300), (399, 35) */
/* CIF TASK (-148, 3250), (463, 35) */
TASK '------------------------------- Unary expressions -------------------------------';
/* CIF TASK (3, 3350), (95, 35) */
/* CIF TASK (2, 3300), (95, 35) */
TASK b := false;
/* CIF PROCEDURECALL (-29, 3400), (160, 35) */
/* CIF PROCEDURECALL (-29, 3350), (160, 35) */
CALL assert(not b, 'not b');
/* CIF TASK (-85, 3450), (273, 35) */
/* CIF TASK (-85, 3400), (273, 35) */
TASK bs1 := {false, true, false, true};
/* CIF TASK (-60, 3500), (222, 35) */
/* CIF TASK (-60, 3450), (222, 35) */
TASK bs3 := {true, false, true, false};
/* CIF PROCEDURECALL (-110, 3550), (322, 35) */
/* CIF PROCEDURECALL (-110, 3500), (322, 35) */
CALL assert(not bs1 = bs3, 'not bs1 = bs3');
/* CIF TASK (14, 3600), (73, 35) */
/* CIF TASK (13, 3550), (73, 35) */
TASK i := 10;
/* CIF PROCEDURECALL (-37, 3650), (177, 35) */
/* CIF PROCEDURECALL (-37, 3600), (177, 35) */
CALL assert(-i = -10, '-i = -10');
/* CIF TASK (-151, 3700), (405, 35) */
/* CIF TASK (-151, 3650), (470, 35) */
TASK '------------------------------- Primary Expression -------------------------------';
/* CIF PROCEDURECALL (-84, 3750), (271, 35) */
/* CIF PROCEDURECALL (-84, 3700), (271, 35) */
CALL assert(((1 + 1) * 4) = 8, '((1 + 1) * 4) = 8');
/* CIF PROCEDURECALL (-157, 3800), (417, 35) */
/* CIF PROCEDURECALL (-157, 3750), (417, 35) */
CALL assert(if true then 1 else 2 fi = 1, 'if true then 1 else 2 fi = 1');
/* CIF PROCEDURECALL (-183, 3850), (468, 35) */
/* CIF PROCEDURECALL (-183, 3800), (468, 35) */
CALL assert(if false then 1.0 else 2.0 fi = 2.0, 'if false then 1.0 else 2.0 fi = 2.0');
/* CIF PROCEDURECALL (-475, 3900), (1052, 35) */
/* CIF PROCEDURECALL (-475, 3850), (1066, 35) */
CALL assert(if false then false else (if true then (if false then false else true fi) else false fi) fi, 'if false then false else (if true then (if false then false else true fi) else false fi) fi');
/* CIF TASK (-183, 3950), (468, 35) */
/* CIF TASK (-183, 3900), (531, 35) */
TASK '------------------------------- Extended Primary Expressions -------------------------------';
/* CIF TASK (-30, 4000), (163, 35) */
/* CIF TASK (-30, 3950), (163, 35) */
TASK fixSeqOf1 := {2, 3, 4};
/* CIF PROCEDURECALL (-95, 4050), (293, 35) */
/* CIF PROCEDURECALL (-95, 4000), (293, 35) */
CALL assert(fixSeqOf1(1) = 3, 'fixSeqOf1(1) = 3');
/* CIF TASK (-31, 4100), (164, 35) */
/* CIF TASK (-31, 4050), (164, 35) */
TASK varSeqOf1 := {2, 3, 4};
/* CIF PROCEDURECALL (-99, 4150), (300, 35) */
/* CIF PROCEDURECALL (-99, 4100), (300, 35) */
CALL assert(varSeqOf1(1) = 3, 'varSeqOf1(1) = 3');
/* CIF TASK (-68, 4200), (239, 35) */
/* CIF TASK (-68, 4150), (239, 35) */
TASK seq := {i 1, b true, f 1.0, s 'HELLO'};
/* CIF PROCEDURECALL (-47, 4250), (196, 35) */
/* CIF PROCEDURECALL (-47, 4200), (196, 35) */
CALL assert(seq!i = 1, 'seq!i = 1');
/* CIF PROCEDURECALL (-69, 4300), (241, 35) */
/* CIF PROCEDURECALL (-69, 4250), (242, 35) */
CALL assert(seq!b = true, 'seq!b = true');
/* CIF PROCEDURECALL (-59, 4350), (221, 35) */
/* CIF PROCEDURECALL (-59, 4300), (221, 35) */
CALL assert(seq!f = 1.0, 'seq!f = 1.0');
/* CIF PROCEDURECALL (-93, 4400), (289, 35) */
/* CIF PROCEDURECALL (-93, 4350), (289, 35) */
CALL assert(seq!s = 'HELLO', 'seq!s = "HELLO"');
/* CIF TASK (-51, 4450), (204, 35) */
/* CIF TASK (-51, 4400), (204, 35) */
TASK nestedSeq := {a {b {c {d 9}}}};
/* CIF PROCEDURECALL (-126, 4500), (354, 35) */
/* CIF PROCEDURECALL (-126, 4450), (360, 35) */
CALL assert(nestedSeq!a!b!c!d = 9, 'nestedSeq!a!b!c!d = 9');
/* CIF NEXTSTATE (1, 4550), (100, 50) */
/* CIF NEXTSTATE (0, 4500), (100, 50) */
NEXTSTATE Wait;
ENDSTATE;
ENDPROCESS expressions;
\ No newline at end of file
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