From a1eb0c8e58495358e96d864c72613de162a32f38 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 13 Jun 2014 17:47:26 +0200 Subject: Add fail updown test (using pre instead of last). --- tests/source/updown_fail.scade | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/source/updown_fail.scade (limited to 'tests/source') diff --git a/tests/source/updown_fail.scade b/tests/source/updown_fail.scade new file mode 100644 index 0000000..b6280ef --- /dev/null +++ b/tests/source/updown_fail.scade @@ -0,0 +1,23 @@ +const bound: int = 7; + +node updown() returns(probe x: int) +let + automaton + initial state UP + let x = (0 -> pre x) + 1; tel + until if x >= bound resume DOWN; + + state DOWN + let x = (0 -> pre x) - 1; tel + until if x <= -bound resume UP; + + returns x; +tel + +node test(i: int) returns(a, b, c: int; exit: bool) +let + exit = i >= 30; + a = updown(); + b = 0; + c = 0; +tel -- cgit v1.2.3