summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-07-05 19:14:18 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-05 19:14:18 +0200
commitae82406c8b7bd1239416b1e6caed34161c133e94 (patch)
tree54a745fbd3c659bb0bbaae1c3f3682b1ea8275b0 /tests
parent0926754e68861947c67986bc9c7e0a011a58267b (diff)
downloadNim-ae82406c8b7bd1239416b1e6caed34161c133e94.tar.gz
make tests green again
Diffstat (limited to 'tests')
-rw-r--r--tests/bind/tmixin.nim2
-rw-r--r--tests/closure/tclosurebug2.nim2
-rw-r--r--tests/effects/teffects3.nim2
-rw-r--r--tests/effects/teffects4.nim2
-rw-r--r--tests/effects/teffects6.nim4
-rw-r--r--tests/exprs/tstmtexprs.nim6
-rw-r--r--tests/metatype/tcompositetypeclasses.nim2
-rw-r--r--tests/objects/tobjects.nim4
-rw-r--r--tests/objects/toop.nim2
-rw-r--r--tests/overload/toverl4.nim4
-rw-r--r--tests/template/ttempl.nim2
-rw-r--r--tests/template/ttempl3.nim2
-rw-r--r--tests/testament/categories.nim1
13 files changed, 18 insertions, 17 deletions
diff --git a/tests/bind/tmixin.nim b/tests/bind/tmixin.nim
index d841326a5..65c650261 100644
--- a/tests/bind/tmixin.nim
+++ b/tests/bind/tmixin.nim
@@ -3,7 +3,7 @@ discard """
 """
 
 type
-  TFoo1 = object of TObject
+  TFoo1 = object of RootObj
     v: int
   TFoo2 = object of TFoo1
     v2: int
diff --git a/tests/closure/tclosurebug2.nim b/tests/closure/tclosurebug2.nim
index f131406a3..5f8911dfa 100644
--- a/tests/closure/tclosurebug2.nim
+++ b/tests/closure/tclosurebug2.nim
@@ -54,7 +54,7 @@ proc len*[A, B](t: TOrderedTable[A, B]): int {.inline.} =
   ## returns the number of keys in `t`.
   result = t.counter
 
-template forAllOrderedPairs(yieldStmt: stmt) {.dirty, immediate.} =
+template forAllOrderedPairs(yieldStmt: untyped) {.dirty.} =
   var h = t.first
   while h >= 0:
     var nxt = t.data[h].next
diff --git a/tests/effects/teffects3.nim b/tests/effects/teffects3.nim
index bd4e0f7c9..cbd11f722 100644
--- a/tests/effects/teffects3.nim
+++ b/tests/effects/teffects3.nim
@@ -9,7 +9,7 @@ type
     a, b, c: string
     fn: proc (): int {.tags: [].}
 
-  EIO2 = ref object of EIO
+
 
 proc raiser(): int {.tags: [TObj, WriteIoEffect].} =
   writeLine stdout, "arg"
diff --git a/tests/effects/teffects4.nim b/tests/effects/teffects4.nim
index dcfab1299..0025c10c5 100644
--- a/tests/effects/teffects4.nim
+++ b/tests/effects/teffects4.nim
@@ -9,7 +9,7 @@ type
     a, b, c: string
     fn: proc (): int {.tags: [ReadIOEffect].}
 
-  EIO2 = ref object of EIO
+
 
 proc q() {.tags: [IoEffect].} =
   discard
diff --git a/tests/effects/teffects6.nim b/tests/effects/teffects6.nim
index ded43b7b4..3dd83786f 100644
--- a/tests/effects/teffects6.nim
+++ b/tests/effects/teffects6.nim
@@ -20,8 +20,8 @@ proc noRaise(x: proc()) {.raises: [].} =
   # unknown call that might raise anything, but valid:
   x()
 
-proc doRaise() {.raises: [EIO].} =
-  raise newException(EIO, "IO")
+proc doRaise() {.raises: [IoError].} =
+  raise newException(IoError, "IO")
 
 proc use*() =
   noRaise(doRaise)
diff --git a/tests/exprs/tstmtexprs.nim b/tests/exprs/tstmtexprs.nim
index e91c20458..61089b694 100644
--- a/tests/exprs/tstmtexprs.nim
+++ b/tests/exprs/tstmtexprs.nim
@@ -33,7 +33,7 @@ when true:
     if (var yy = 0; yy != 0):
       echo yy
     else:
-      echo(try: parseInt("1244") except EINvalidValue: -1)
+      echo(try: parseInt("1244") except ValueError: -1)
     result = case x
              of 23: 3
              of 64:
@@ -87,7 +87,7 @@ proc parseResponse(): JsonNode =
     var excMsg = key & "("
     if (var n=result["key2"]; n != nil):
       excMsg &= n.str
-    raise newException(ESynch, excMsg)
+    raise newException(SystemError, excMsg)
 
 
 
@@ -99,7 +99,7 @@ let b = (se[1] = 1; 1)
 # bug #1161
 
 type
-  PFooBase = ref object of PObject
+  PFooBase = ref object of RootRef
     field: int
 
   PFoo[T] = ref object of PFooBase
diff --git a/tests/metatype/tcompositetypeclasses.nim b/tests/metatype/tcompositetypeclasses.nim
index 1cb86e4d7..d125b119b 100644
--- a/tests/metatype/tcompositetypeclasses.nim
+++ b/tests/metatype/tcompositetypeclasses.nim
@@ -19,7 +19,7 @@ var
   vfoo: TFoo[int, string]
   vbar: TFoo[string, string]
   vbaz: TFoo[int, int]
-  vnotbaz: TFoo[TObject, TObject]
+  vnotbaz: TFoo[RootObj, RootObj]
 
 proc foo(x: TFoo) = echo "foo"
 proc bar(x: TBar) = echo "bar"
diff --git a/tests/objects/tobjects.nim b/tests/objects/tobjects.nim
index 2f46b46b5..66a38960e 100644
--- a/tests/objects/tobjects.nim
+++ b/tests/objects/tobjects.nim
@@ -1,5 +1,5 @@
 type
-  TBase = object of TObject
+  TBase = object of RootObj
     x, y: int
 
   TSubclassKind = enum ka, kb, kc, kd, ke, kf
@@ -13,7 +13,7 @@ type
     n: bool
 
 type
-  TMyObject = object of TObject
+  TMyObject = object of RootObj
     case disp: range[0..4]
       of 0: arg: char
       of 1: s: string
diff --git a/tests/objects/toop.nim b/tests/objects/toop.nim
index ebc59f637..4bd3998f3 100644
--- a/tests/objects/toop.nim
+++ b/tests/objects/toop.nim
@@ -3,7 +3,7 @@ discard """
 """
 
 type
-  TA = object of TObject
+  TA = object of RootObj
     x, y: int
 
   TB = object of TA
diff --git a/tests/overload/toverl4.nim b/tests/overload/toverl4.nim
index a15716852..537925674 100644
--- a/tests/overload/toverl4.nim
+++ b/tests/overload/toverl4.nim
@@ -28,9 +28,9 @@ proc newElement[TKey, TData](key: TKey, left: PElement[TKey, TData] = nil, right
 proc newElement[Tkey, TData](key: Tkey, data: TData) : PElement[Tkey, TData] =
   PElement[TKey, TData](kind: ElementKind.leaf, data: data)
 
-proc find*[TKey, TData](root: PElement[TKey, TData], key: TKey): TData {.raises: [EInvalidKey].} =
+proc find*[TKey, TData](root: PElement[TKey, TData], key: TKey): TData {.raises: [KeyError].} =
   if root.left == nil:
-    raise newException(EInvalidKey, "key does not exist: " & key)
+    raise newException(KeyError, "key does not exist: " & key)
 
   var tmp_element = addr(root)
 
diff --git a/tests/template/ttempl.nim b/tests/template/ttempl.nim
index 5f1341990..c022201f2 100644
--- a/tests/template/ttempl.nim
+++ b/tests/template/ttempl.nim
@@ -17,7 +17,7 @@ const
 var i = 0
 for item in items(tabs):
   var content = $i
-  var file: TFile
+  var file: File
   if open(file, changeFileExt(item[1], "html"), fmWrite):
     write(file, sunsetTemplate(current=item[1], ticker="", content=content,
                                tabs=tabs))
diff --git a/tests/template/ttempl3.nim b/tests/template/ttempl3.nim
index a8e136801..d6a369d32 100644
--- a/tests/template/ttempl3.nim
+++ b/tests/template/ttempl3.nim
@@ -3,7 +3,7 @@ template withOpenFile(f: untyped, filename: string, mode: FileMode,
                       actions: untyped): untyped =
   block:
     # test that 'f' is implicitly 'injecting':
-    var f: TFile
+    var f: File
     if open(f, filename, mode):
       try:
         actions
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index 9affbc159..cde8880b3 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -351,6 +351,7 @@ proc manyLoc(r: var TResults, cat: Category, options: string) =
     if kind == pcDir:
       when defined(windows):
         if dir.endsWith"nake": continue
+      if dir.endsWith"named_argument_bug": continue
       let mainfile = findMainFile(dir)
       if mainfile != "":
         testNoSpec r, makeTest(mainfile, options, cat)