summary refs log tree commit diff stats
path: root/tests/reject
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-04-11 00:25:24 +0200
committerAraq <rumpf_a@web.de>2011-04-11 00:25:24 +0200
commitfc6cc79273f75983e57c43c2a19016e5881ee2b7 (patch)
treebf114b3c33683250359005d64c325b150f8989c7 /tests/reject
parentc96aaecfb439cda648e780e0686b02c5f99e0c60 (diff)
downloadNim-fc6cc79273f75983e57c43c2a19016e5881ee2b7.tar.gz
some tests cleaned up; some bugfixes
Diffstat (limited to 'tests/reject')
-rwxr-xr-xtests/reject/tambsym2.nim13
-rwxr-xr-xtests/reject/tbind4.nim6
-rwxr-xr-xtests/reject/tnamedparams.nim2
-rw-r--r--tests/reject/tno_int_in_bool_context.nim2
-rwxr-xr-xtests/reject/tnot.nim4
-rwxr-xr-xtests/reject/toverl.nim14
-rwxr-xr-xtests/reject/trecinca.nim4
-rwxr-xr-xtests/reject/trectype.nim30
-rwxr-xr-xtests/reject/ttypelessemptyset.nim2
-rwxr-xr-xtests/reject/ttypenoval.nim2
10 files changed, 33 insertions, 46 deletions
diff --git a/tests/reject/tambsym2.nim b/tests/reject/tambsym2.nim
deleted file mode 100755
index 98327354d..000000000
--- a/tests/reject/tambsym2.nim
+++ /dev/null
@@ -1,13 +0,0 @@
-discard """
-  file: "tambsym2.nim"
-  line: 9
-  errormsg: "undeclared identifier: \'CreateRGBSurface\'"
-"""
-
-from sdl import PSurface
-
-discard SDL.CreateRGBSurface(SDL.SWSURFACE, 23, 34, 
-      32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xff000000'i32)
-
-
-
diff --git a/tests/reject/tbind4.nim b/tests/reject/tbind4.nim
index ae525f06e..a0ba88e7c 100755
--- a/tests/reject/tbind4.nim
+++ b/tests/reject/tbind4.nim
@@ -1,12 +1,12 @@
 discard """
-  file: "tbind4.nim"
-  line: 9
+  file: "mbind4.nim"
+  line: 6
   errormsg: "undeclared identifier: \'lastId\'"
 """
 # Module B
 import mbind4
 
-echo genId() #ERROR_MSG instantiation from here
+echo genId()
 
 
 
diff --git a/tests/reject/tnamedparams.nim b/tests/reject/tnamedparams.nim
index 1772bd938..5fb7699ba 100755
--- a/tests/reject/tnamedparams.nim
+++ b/tests/reject/tnamedparams.nim
@@ -1,7 +1,7 @@
 discard """
   file: "tnamedparams.nim"
   line: 8
-  errormsg: "Error: type mismatch: got (input: string, filename: string, line: int, col: int)"
+  errormsg: "type mismatch: got (input: string, filename: string, line: int, col: int)"
 """
 import pegs
 
diff --git a/tests/reject/tno_int_in_bool_context.nim b/tests/reject/tno_int_in_bool_context.nim
index a98a14826..c539bb556 100644
--- a/tests/reject/tno_int_in_bool_context.nim
+++ b/tests/reject/tno_int_in_bool_context.nim
@@ -1,6 +1,6 @@
 discard """
   line: 6
-  errormsg: "Error: type mismatch: got (int) but expected 'bool'"
+  errormsg: "type mismatch: got (int) but expected 'bool'"
 """
 
 if 1: 
diff --git a/tests/reject/tnot.nim b/tests/reject/tnot.nim
index cd0f538e6..8075a4768 100755
--- a/tests/reject/tnot.nim
+++ b/tests/reject/tnot.nim
@@ -1,6 +1,6 @@
 discard """
-  file: "tnot.nim"
-  line: 14
+  file: "system.nim"
+  line: 599
   errormsg: "type mismatch"
 """
 # BUG: following compiles, but should not:
diff --git a/tests/reject/toverl.nim b/tests/reject/toverl.nim
index 5c5f8d440..807b643a4 100755
--- a/tests/reject/toverl.nim
+++ b/tests/reject/toverl.nim
@@ -1,13 +1,13 @@
 discard """
   file: "toverl.nim"
   line: 11
-  errormsg: "attempt to redefine \'TNone\'"
+  errormsg: "redefinition of \'TNone\'"
 """
-# Test for overloading

-

-type

-  TNone {.exportc: "_NONE", final.} = object

-

-proc TNone(a, b: int) = nil #ERROR_MSG attempt to redefine 'TNone'

+# Test for overloading
+
+type
+  TNone {.exportc: "_NONE", final.} = object
+
+proc TNone(a, b: int) = nil #ERROR_MSG attempt to redefine 'TNone'
 
 
diff --git a/tests/reject/trecinca.nim b/tests/reject/trecinca.nim
index a567c84db..ec5c50be0 100755
--- a/tests/reject/trecinca.nim
+++ b/tests/reject/trecinca.nim
@@ -1,6 +1,6 @@
 discard """
-  file: "trecinca.nim"
-  line: 8
+  file: "trecincb.nim"
+  line: 9
   errormsg: "recursive dependency: \'tests/reject/trecincb.nim\'"
 """
 # Test recursive includes
diff --git a/tests/reject/trectype.nim b/tests/reject/trectype.nim
index e9bf8234d..b8b23a806 100755
--- a/tests/reject/trectype.nim
+++ b/tests/reject/trectype.nim
@@ -3,21 +3,21 @@ discard """
   line: 25
   errormsg: "internal error: cannot generate C type for: PA"
 """
-# Test recursive type descriptions

-# (mainly for the C code generator)

-

-type

-  PA = ref TA

-  TA = array [0..2, PA]

-

-  PRec = ref TRec

-  TRec {.final.} = object

-    a, b: TA

-

-  P1 = ref T1

-  PB = ref TB

-  TB = array [0..3, P1]

-  T1 = array [0..6, PB]

+# Test recursive type descriptions
+# (mainly for the C code generator)
+
+type
+  PA = ref TA
+  TA = array [0..2, PA]
+
+  PRec = ref TRec
+  TRec {.final.} = object
+    a, b: TA
+
+  P1 = ref T1
+  PB = ref TB
+  TB = array [0..3, P1]
+  T1 = array [0..6, PB]
 
 var
   x: PA
diff --git a/tests/reject/ttypelessemptyset.nim b/tests/reject/ttypelessemptyset.nim
index 2335de359..68bfb0249 100755
--- a/tests/reject/ttypelessemptyset.nim
+++ b/tests/reject/ttypelessemptyset.nim
@@ -1,7 +1,7 @@
 discard """
   file: "ttypelessemptyset.nim"
   line: 5
-  errormsg: "Error: internal error: invalid kind for last(tyEmpty)"
+  errormsg: "internal error: invalid kind for last(tyEmpty)"
 """
 var q = false
 discard (if q: {} else: {})
diff --git a/tests/reject/ttypenoval.nim b/tests/reject/ttypenoval.nim
index 44b3db879..9944e52a1 100755
--- a/tests/reject/ttypenoval.nim
+++ b/tests/reject/ttypenoval.nim
@@ -1,6 +1,6 @@
 discard """
   file: "ttypenoval.nim"
-  line: 36
+  line: 38
   errormsg: "a type has no value"
 """