summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2013-12-06 16:01:13 +0000
committerhallgren <hallgren@chalmers.se>2013-12-06 16:01:13 +0000
commit953c6e8fb5a1884e36df59d4a7fc04460dd87153 (patch)
tree658c4898c40c4848c643e89c4c3fcbd14086b6c1 /testsuite
parenta98f4aa4be7b72a310a8b5826e3cc82c7edb8f40 (diff)
testsuite: reduced the number of failing tests from 25 to 13
Some tests may fail on Windows because of \ instead of / in paths.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold8
-rw-r--r--testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold8
-rw-r--r--testsuite/compiler/check/cyclic/opers/test.gfs.gold16
-rw-r--r--testsuite/compiler/check/cyclic/params/test.gfs.gold8
-rw-r--r--testsuite/compiler/check/lincat-types/test.gfs.gold14
-rw-r--r--testsuite/compiler/check/oper-definition/test.gfs.gold10
-rw-r--r--testsuite/compiler/params/params.gfs2
-rw-r--r--testsuite/compiler/renamer/funpatt.gfs.gold10
-rw-r--r--testsuite/compiler/typecheck/abstract/test_A.gfs.gold10
-rw-r--r--testsuite/compiler/typecheck/abstract/test_B.gfs.gold10
-rw-r--r--testsuite/compiler/typecheck/abstract/test_C.gfs.gold10
-rw-r--r--testsuite/compiler/typecheck/concrete/test_A.gfs.gold10
-rw-r--r--testsuite/compiler/update/ArrityCheck.gfs.gold16
-rw-r--r--testsuite/run.hs13
14 files changed, 73 insertions, 72 deletions
diff --git a/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold b/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold
index 9e241effb..b4508906d 100644
--- a/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold
+++ b/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold
@@ -1,4 +1,4 @@
-
-
-checking module Test1Abs
- circular definitions: A B
+
+
+testsuite/compiler/check/cyclic/abs-types/Test1Abs.gf:
+ circular definitions: A B
diff --git a/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold b/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold
index c52a5373d..de8d78a3c 100644
--- a/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold
+++ b/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold
@@ -1,4 +1,4 @@
-
-
-checking module Test2Abs
- circular definitions: f g
+
+
+testsuite/compiler/check/cyclic/abs-types/Test2Abs.gf:
+ circular definitions: f g
diff --git a/testsuite/compiler/check/cyclic/opers/test.gfs.gold b/testsuite/compiler/check/cyclic/opers/test.gfs.gold
index cc052494c..2ae570e8c 100644
--- a/testsuite/compiler/check/cyclic/opers/test.gfs.gold
+++ b/testsuite/compiler/check/cyclic/opers/test.gfs.gold
@@ -1,8 +1,8 @@
-
-
-checking module TestOpers
- circular definitions: A B
-
-
-checking module TestOperTypes
- circular definitions: A T
+
+
+testsuite/compiler/check/cyclic/opers/TestOpers.gf:
+ circular definitions: A B
+
+
+testsuite/compiler/check/cyclic/opers/TestOperTypes.gf:
+ circular definitions: A T
diff --git a/testsuite/compiler/check/cyclic/params/test.gfs.gold b/testsuite/compiler/check/cyclic/params/test.gfs.gold
index dea8440d1..e217ac135 100644
--- a/testsuite/compiler/check/cyclic/params/test.gfs.gold
+++ b/testsuite/compiler/check/cyclic/params/test.gfs.gold
@@ -1,4 +1,4 @@
-
-
-checking module TestParams
- circular definitions: A B
+
+
+testsuite/compiler/check/cyclic/params/TestParams.gf:
+ circular definitions: A B
diff --git a/testsuite/compiler/check/lincat-types/test.gfs.gold b/testsuite/compiler/check/lincat-types/test.gfs.gold
index 34aa5352c..7e95ec7af 100644
--- a/testsuite/compiler/check/lincat-types/test.gfs.gold
+++ b/testsuite/compiler/check/lincat-types/test.gfs.gold
@@ -1,7 +1,7 @@
-
-
-checking module TestCnc
- Happened in linearization type of S in TestCnc.gf, line 3:
- type of PTrue
- expected: Type
- inferred: PBool
+
+
+testsuite/compiler/check/lincat-types/TestCnc.gf:3:
+ Happened in linearization type of S
+ type of PTrue
+ expected: Type
+ inferred: PBool
diff --git a/testsuite/compiler/check/oper-definition/test.gfs.gold b/testsuite/compiler/check/oper-definition/test.gfs.gold
index 6d1d6bc77..240819c74 100644
--- a/testsuite/compiler/check/oper-definition/test.gfs.gold
+++ b/testsuite/compiler/check/oper-definition/test.gfs.gold
@@ -1,5 +1,5 @@
-
-
-checking module Res
- Happened in operation my_oper in Res.gf, line 3:
- No definition given to the operation
+
+
+testsuite/compiler/check/oper-definition/Res.gf:3:
+ Happened in operation my_oper
+ No definition given to the operation
diff --git a/testsuite/compiler/params/params.gfs b/testsuite/compiler/params/params.gfs
index 234aa4fbf..87a46e8f8 100644
--- a/testsuite/compiler/params/params.gfs
+++ b/testsuite/compiler/params/params.gfs
@@ -1 +1 @@
-i testsuite\compiler\params\paramsCnc.gf
+i testsuite/compiler/params/paramsCnc.gf
diff --git a/testsuite/compiler/renamer/funpatt.gfs.gold b/testsuite/compiler/renamer/funpatt.gfs.gold
index 382428255..873c90c1b 100644
--- a/testsuite/compiler/renamer/funpatt.gfs.gold
+++ b/testsuite/compiler/renamer/funpatt.gfs.gold
@@ -1,5 +1,5 @@
-
-
-renaming module funpatt
- renaming of d in funpatt.gf, line 11
- data constructor expected but funpatt.D1 is found instead
+
+
+testsuite/compiler/renamer/funpatt.gf:11:
+ Happened in the renaming of d
+ data constructor expected but funpatt.D1 is found instead
diff --git a/testsuite/compiler/typecheck/abstract/test_A.gfs.gold b/testsuite/compiler/typecheck/abstract/test_A.gfs.gold
index 19a217175..821a4da2c 100644
--- a/testsuite/compiler/typecheck/abstract/test_A.gfs.gold
+++ b/testsuite/compiler/typecheck/abstract/test_A.gfs.gold
@@ -1,5 +1,5 @@
-
-
-checking module A
- Prod expected for function A instead of Type
- in category B in A.gf, line 4
+
+
+testsuite/compiler/typecheck/abstract/A.gf:4:
+ Happened in the category B
+ Prod expected for function A instead of Type
diff --git a/testsuite/compiler/typecheck/abstract/test_B.gfs.gold b/testsuite/compiler/typecheck/abstract/test_B.gfs.gold
index b2839881d..1355ff7c5 100644
--- a/testsuite/compiler/typecheck/abstract/test_B.gfs.gold
+++ b/testsuite/compiler/typecheck/abstract/test_B.gfs.gold
@@ -1,5 +1,5 @@
-
-
-checking module B
- Prod expected for function S instead of Type
- in type of function f in B.gf, line 5
+
+
+testsuite/compiler/typecheck/abstract/B.gf:5:
+ Happened in the type of function f
+ Prod expected for function S instead of Type
diff --git a/testsuite/compiler/typecheck/abstract/test_C.gfs.gold b/testsuite/compiler/typecheck/abstract/test_C.gfs.gold
index dd15dab89..d055b11cd 100644
--- a/testsuite/compiler/typecheck/abstract/test_C.gfs.gold
+++ b/testsuite/compiler/typecheck/abstract/test_C.gfs.gold
@@ -1,5 +1,5 @@
-
-
-checking module C
- {Int <> S}
- in definition of function f in C.gf, line 6
+
+
+testsuite/compiler/typecheck/abstract/C.gf:6:
+ Happened in the definition of function f
+ {Int <> S}
diff --git a/testsuite/compiler/typecheck/concrete/test_A.gfs.gold b/testsuite/compiler/typecheck/concrete/test_A.gfs.gold
index 4f8d307aa..1bd4dffab 100644
--- a/testsuite/compiler/typecheck/concrete/test_A.gfs.gold
+++ b/testsuite/compiler/typecheck/concrete/test_A.gfs.gold
@@ -1,5 +1,5 @@
-
-
-checking module A
- Happened in operation silly in A.gf, line 5:
- A function type is expected for a_Det instead of type Str
+
+
+testsuite/compiler/typecheck/concrete/A.gf:5:
+ Happened in operation silly
+ A function type is expected for a_Det instead of type Str
diff --git a/testsuite/compiler/update/ArrityCheck.gfs.gold b/testsuite/compiler/update/ArrityCheck.gfs.gold
index 28f98f445..7e0ff3d44 100644
--- a/testsuite/compiler/update/ArrityCheck.gfs.gold
+++ b/testsuite/compiler/update/ArrityCheck.gfs.gold
@@ -1,8 +1,8 @@
-
-
-C:\gf\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
+
+
+testsuite/compiler/update/ArrityCheck.gf:6:1:
+ conflicting information in module ArrityCheck
+ fun f : Int -> Int -> Int ;
+ def f 0 = \x -> x ;
+and
+ def f 1 1 = 0 ;
diff --git a/testsuite/run.hs b/testsuite/run.hs
index 1f671eabf..71af1e403 100644
--- a/testsuite/run.hs
+++ b/testsuite/run.hs
@@ -9,7 +9,7 @@ import System.Exit(exitSuccess,exitFailure)
main =
do res <- walk "testsuite"
let cnt = length res
- (good,bad) = partition ((=="OK").fst) res
+ (good,bad) = partition ((=="OK").fst.snd) res
ok = length good
fail = ok<cnt
putStrLn $ show ok++"/"++show cnt++ " passed/tests"
@@ -24,15 +24,15 @@ main =
"<!DOCTYPE html>\n"
++ "<meta charset=\"UTF-8\">\n"
++ "<style>\n"
- ++ "pre { max-width: 500px; overflow: scroll; }\n"
+ ++ "pre { max-width: 600px; overflow: scroll; }\n"
++ "th,td { vertical-align: top; text-align: left; }\n"
++ "</style>\n"
++ "<table border=1>\n<tr><th>Result<th>Input<th>Gold<th>Output\n"
++ unlines (map testToHTML res)
++ "</table>\n"
- testToHTML (res,(input,gold,output)) =
- "<tr>"++concatMap (td.pre) [res,input,gold,output]
+ testToHTML (in_file,(res,(input,gold,output))) =
+ "<tr>"++concatMap td [pre res,in_file++":\n"++pre input,pre gold,pre output]
pre s = "<pre>"++s++"</pre>"
td s = "<td>"++s
@@ -45,9 +45,10 @@ main =
then do let in_file = fpath
gold_file = fpath <.> ".gold"
out_file = fpath <.> ".out"
+ putStr $ in_file++": "; hFlush stdout
res <- runTest in_file out_file gold_file
- putStrLn $ fst res++": "++in_file
- return [res]
+ putStrLn $ fst res
+ return [(in_file,res)]
else return []
else walk fpath