From 14d544935fc87df2b258cd4c9ed5acede44fe1f3 Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Mon, 14 Oct 2013 13:37:07 +0100 Subject: Run main() to execute tests Tests do not pass because of weird pattern-matching errors in the interpreter. --- src/test/test1.sail | 2 ++ src/test/test2.sail | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/test1.sail b/src/test/test1.sail index e3a98e3f..98dd92c2 100644 --- a/src/test/test1.sail +++ b/src/test/test1.sail @@ -10,3 +10,5 @@ typedef maybe = const union forall a. { unit None; a Some; } typedef colors = enumerate { red; green; blue } typedef creg = register bits [5:i] { 5 : h ; 6..7 : j} let bool e = true + +function unit main _ = () diff --git a/src/test/test2.sail b/src/test/test2.sail index 778e69cb..baffd9b3 100644 --- a/src/test/test2.sail +++ b/src/test/test2.sail @@ -1,4 +1,5 @@ -function unit main ( < bit > x ) = { - 42 +function nat id ( n ) = n + +function nat main _ = { + id ( 42 ); } -let unit run = main ( 42 ) -- cgit v1.2.3