From 07e5279bffc69bb28be385553fdf29976f2015b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Thu, 12 May 2011 10:57:38 +0200 Subject: [PATCH] two small tests. --- test/good/auto2.ept | 21 +++++++++++++++++++++ test/good/current.ept | 19 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/good/auto2.ept create mode 100644 test/good/current.ept diff --git a/test/good/auto2.ept b/test/good/auto2.ept new file mode 100644 index 0000000..ab579f4 --- /dev/null +++ b/test/good/auto2.ept @@ -0,0 +1,21 @@ +node count() returns (o : int) +let + o = 0 fby (o + 1); +tel + +node f() returns(x,y : bool) +let + (x,y) = (true,false) +tel + +node main() returns (c,c1 : bool) +let + automaton + state One + do (c,c1) = f() + until count() = 5 then Two + state Two + do (c,c1) = f() + until count() = 3 then One + end +tel diff --git a/test/good/current.ept b/test/good/current.ept new file mode 100644 index 0000000..77b71a9 --- /dev/null +++ b/test/good/current.ept @@ -0,0 +1,19 @@ + +node current (c : bool; x : int on c) returns ( y : int ) +let + y = merge c (true -> x) (false -> 0 fby y whenot c) +tel + +node internal_current (c : bool; x : int on c) returns ( y : int on c) +var x_cur : int; +let + x_cur = merge c (true -> x) (false -> 0 fby x_cur whenot c); + y = x_cur when c +tel + +node use_current (c : bool; x : int) returns (y : int on c) +var x_cur :int; +let + x_cur = current(c,x); + y = x_cur when c; +tel