From 96272339e45dd3d25198a63e38ce132346a585d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Wed, 18 May 2011 09:59:58 +0200 Subject: [PATCH] some tests. --- test/bad/clock_causality.ept | 13 +++++++++++++ test/bad/clock_dep.ept | 5 +++++ test/good/clock_causality.ept | 13 +++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 test/bad/clock_causality.ept create mode 100644 test/bad/clock_dep.ept create mode 100644 test/good/clock_causality.ept diff --git a/test/bad/clock_causality.ept b/test/bad/clock_causality.ept new file mode 100644 index 0000000..d8b3d0b --- /dev/null +++ b/test/bad/clock_causality.ept @@ -0,0 +1,13 @@ +node cross<>(x:int) returns (y:int; c:bool) +let + c = (0 fby y) = l; + y = merge c (true -> x) (false -> 0); +tel + +node main(x:int) returns (z:int) +var y,t : int; c : bool; +let + y = 0 fby (y+1); + (t,c) = cross<<4>>(y); + z = merge c (true -> y + t) (false -> 0) +tel diff --git a/test/bad/clock_dep.ept b/test/bad/clock_dep.ept new file mode 100644 index 0000000..906aab4 --- /dev/null +++ b/test/bad/clock_dep.ept @@ -0,0 +1,5 @@ +node cross<>(x:int; x2:int; c:bool) returns (y:int; c2:bool) +let + c2 = c; + y = x + (x2 when c2) ; +tel diff --git a/test/good/clock_causality.ept b/test/good/clock_causality.ept new file mode 100644 index 0000000..097ef2b --- /dev/null +++ b/test/good/clock_causality.ept @@ -0,0 +1,13 @@ +node cross<>(x:int) returns (y:int; c:bool) +let + c = x = l; + y = x when c; +tel + +node main(x:int) returns (z:int) +var y,t : int; c : bool; +let + y = 0 fby (y+1); + (t,c) = cross<<4>>(x); + z = merge c (true -> y + t) (false -> 0) +tel