From fd4dffef6291286986535b50a4d3e03e299fbfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwena=C3=ABl=20Delaval?= Date: Fri, 4 Sep 2015 17:33:49 +0200 Subject: [PATCH] Adding tests --- test/good/autohiera3.ept | 17 +++++++++++++++++ test/good/contrenum.ept | 15 +++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 test/good/autohiera3.ept create mode 100644 test/good/contrenum.ept diff --git a/test/good/autohiera3.ept b/test/good/autohiera3.ept new file mode 100644 index 0000000..64c8b58 --- /dev/null +++ b/test/good/autohiera3.ept @@ -0,0 +1,17 @@ +node test(r,r1,e:bool) returns (st:int) +let +automaton + state S1 do + st=0; + until r then S2 + state S2 do + automaton + state P1 do + st=1; + until r1 then P2 + state P2 do + st=2; + end; + until e then S1 +end +tel diff --git a/test/good/contrenum.ept b/test/good/contrenum.ept new file mode 100644 index 0000000..280254d --- /dev/null +++ b/test/good/contrenum.ept @@ -0,0 +1,15 @@ +type mode = Idle | Active + +node f(x:bool) returns (y:bool) + +contract + enforce (not y) + with (c:mode) + +let + switch c + | Idle do y = false + | Active do y = true + end +tel + \ No newline at end of file