From 9142fcff76eabaabe984760c211be1a0f31bcb55 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sat, 13 Jun 2009 13:54:06 +0000 Subject: split the testsuite to different directories for compiler, runtime and libraries --- testsuite/compiler/check/lins/lins.gf | 9 +++++++++ testsuite/compiler/check/lins/lins.gfs | 2 ++ testsuite/compiler/check/lins/lins.gfs.gold | 17 +++++++++++++++++ testsuite/compiler/check/lins/linsCnc.gf | 11 +++++++++++ testsuite/compiler/typecheck/Check.gf | 14 ++++++++++++++ testsuite/compiler/update/ArrityCheck.gf | 5 +++++ testsuite/compiler/update/ArrityCheck.gfs | 1 + testsuite/compiler/update/ArrityCheck.gfs.gold | 8 ++++++++ 8 files changed, 67 insertions(+) create mode 100644 testsuite/compiler/check/lins/lins.gf create mode 100644 testsuite/compiler/check/lins/lins.gfs create mode 100644 testsuite/compiler/check/lins/lins.gfs.gold create mode 100644 testsuite/compiler/check/lins/linsCnc.gf create mode 100644 testsuite/compiler/typecheck/Check.gf create mode 100644 testsuite/compiler/update/ArrityCheck.gf create mode 100644 testsuite/compiler/update/ArrityCheck.gfs create mode 100644 testsuite/compiler/update/ArrityCheck.gfs.gold (limited to 'testsuite/compiler') diff --git a/testsuite/compiler/check/lins/lins.gf b/testsuite/compiler/check/lins/lins.gf new file mode 100644 index 000000000..9da3058d9 --- /dev/null +++ b/testsuite/compiler/check/lins/lins.gf @@ -0,0 +1,9 @@ +abstract lins = { + +cat Nat ; +cat C Nat ; + +fun zero : Nat ; + test : C zero ; + +} \ No newline at end of file diff --git a/testsuite/compiler/check/lins/lins.gfs b/testsuite/compiler/check/lins/lins.gfs new file mode 100644 index 000000000..f84b865d9 --- /dev/null +++ b/testsuite/compiler/check/lins/lins.gfs @@ -0,0 +1,2 @@ +i -src -erasing=on testsuite/compiler/check/lins/linsCnc.gf +pg -printer=pmcfg_pretty diff --git a/testsuite/compiler/check/lins/lins.gfs.gold b/testsuite/compiler/check/lins/lins.gfs.gold new file mode 100644 index 000000000..bce4d9d05 --- /dev/null +++ b/testsuite/compiler/check/lins/lins.gfs.gold @@ -0,0 +1,17 @@ +checking module linsCnc +Warning: no linearization type for C, inserting default {s : Str} +checking module linsCnc +Warning: no linearization of test + +language linsCnc +productions + C1 -> F0[] +functions + F0 := () [zero] +sequences +startcats + C := [C0] + Float := [Float] + Int := [Int] + Nat := [C1] + String := [String] diff --git a/testsuite/compiler/check/lins/linsCnc.gf b/testsuite/compiler/check/lins/linsCnc.gf new file mode 100644 index 000000000..3d430f5a0 --- /dev/null +++ b/testsuite/compiler/check/lins/linsCnc.gf @@ -0,0 +1,11 @@ +concrete linsCnc of lins = { + +lincat Nat = {} ; + +-- we expect warnings because the lines bellow are commented out +-- we don't expect warning for zero because Nat = {} + +-- lincat C = {s : Str} ; +-- lin test = {s = "test"} ; + +} \ No newline at end of file diff --git a/testsuite/compiler/typecheck/Check.gf b/testsuite/compiler/typecheck/Check.gf new file mode 100644 index 000000000..38d098209 --- /dev/null +++ b/testsuite/compiler/typecheck/Check.gf @@ -0,0 +1,14 @@ +abstract Check = { + +cat Typ ; Exp Typ ; + +fun plus : (t : Typ) -> (_,_ : Exp t) -> Exp t ; + +fun TInt, TFloat : Typ ; + +fun Zero : Exp TInt ; +fun Pi : Exp TFloat ; + +fun sqrt : Exp TFloat -> Exp TFloat ; + +} diff --git a/testsuite/compiler/update/ArrityCheck.gf b/testsuite/compiler/update/ArrityCheck.gf new file mode 100644 index 000000000..9ee03ba6e --- /dev/null +++ b/testsuite/compiler/update/ArrityCheck.gf @@ -0,0 +1,5 @@ +abstract ArrityCheck = { + fun f : Int -> Int -> Int ; + def f 0 = \x -> x ; + f 1 1 = 0 ; +} diff --git a/testsuite/compiler/update/ArrityCheck.gfs b/testsuite/compiler/update/ArrityCheck.gfs new file mode 100644 index 000000000..69d739975 --- /dev/null +++ b/testsuite/compiler/update/ArrityCheck.gfs @@ -0,0 +1 @@ +i testsuite/compiler/update/ArrityCheck.gf diff --git a/testsuite/compiler/update/ArrityCheck.gfs.gold b/testsuite/compiler/update/ArrityCheck.gfs.gold new file mode 100644 index 000000000..d6ea2bb0c --- /dev/null +++ b/testsuite/compiler/update/ArrityCheck.gfs.gold @@ -0,0 +1,8 @@ + + +C:\gf_2\testsuite\compiler\update\ArrityCheck.gf:6:1: cannot unify the informations + fun f : Int -> Int -> Int ; + def f 0 = \x -> x ; +and + def f 1 1 = 0 ; +in module ArrityCheck -- cgit v1.2.3