summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/rodfiles/amethods.nim4
-rw-r--r--tests/rodfiles/gtkex1.nim6
-rw-r--r--tests/rodfiles/gtkex2.nim6
-rw-r--r--tests/rodfiles/int2bool.nim1
-rw-r--r--tests/testament/backend.nim1
-rw-r--r--tests/testament/categories.nim36
6 files changed, 27 insertions, 27 deletions
diff --git a/tests/rodfiles/amethods.nim b/tests/rodfiles/amethods.nim
index ecd36d491..29cf757f7 100644
--- a/tests/rodfiles/amethods.nim
+++ b/tests/rodfiles/amethods.nim
@@ -1,11 +1,11 @@
 
 type
-  TBaseClass* = object of TObject
+  TBaseClass* = object of RootObj
 
 proc newBaseClass*: ref TBaseClass =
   new result
 
-method echoType*(x: ref TBaseClass) =
+method echoType*(x: ref TBaseClass) {.base.} =
   echo "base class"
 
 proc echoAlias*(x: ref TBaseClass) =
diff --git a/tests/rodfiles/gtkex1.nim b/tests/rodfiles/gtkex1.nim
index 156ba5322..50779cb9e 100644
--- a/tests/rodfiles/gtkex1.nim
+++ b/tests/rodfiles/gtkex1.nim
@@ -1,12 +1,12 @@
 import
   cairo, glib2, gtk2
 
-proc destroy(widget: pWidget, data: pgpointer) {.cdecl.} =
+proc destroy(widget: PWidget, data: Pgpointer) {.cdecl.} =
   main_quit()
 
 var
-  window: pWidget
-nimrod_init()
+  window: PWidget
+nim_init()
 window = window_new(WINDOW_TOPLEVEL)
 discard signal_connect(window, "destroy",
                        SIGNAL_FUNC(gtkex1.destroy), nil)
diff --git a/tests/rodfiles/gtkex2.nim b/tests/rodfiles/gtkex2.nim
index 70926bd50..0949e4872 100644
--- a/tests/rodfiles/gtkex2.nim
+++ b/tests/rodfiles/gtkex2.nim
@@ -2,17 +2,17 @@
 import
   glib2, gtk2
 
-proc destroy(widget: pWidget, data: pgpointer){.cdecl.} =
+proc destroy(widget: PWidget, data: Pgpointer){.cdecl.} =
   main_quit()
 
 var
   window: PWidget
   button: PWidget
 
-nimrod_init()
+nim_init()
 window = window_new(WINDOW_TOPLEVEL)
 button = button_new("Click me")
-set_border_width(PContainer(Window), 5)
+set_border_width(PContainer(window), 5)
 add(PContainer(window), button)
 discard signal_connect(window, "destroy",
                            SIGNAL_FUNC(gtkex2.destroy), nil)
diff --git a/tests/rodfiles/int2bool.nim b/tests/rodfiles/int2bool.nim
index 0f6fd14e6..bb0682844 100644
--- a/tests/rodfiles/int2bool.nim
+++ b/tests/rodfiles/int2bool.nim
@@ -2,7 +2,6 @@
 {.overflowchecks: on.}
 
 converter uglyToBool*(x: int): bool =
-  {.Breakpoint.}
   result = x != 0
 
 
diff --git a/tests/testament/backend.nim b/tests/testament/backend.nim
index 671b5c8b7..8f0961566 100644
--- a/tests/testament/backend.nim
+++ b/tests/testament/backend.nim
@@ -59,6 +59,7 @@ var
   thisMachine: MachineId
   thisCommit: CommitId
 
+{.experimental.}
 proc `()`(cmd: string{lit}): string = cmd.execProcess.string.strip
 
 proc getMachine*(db: DbConn): MachineId =
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index e534cc161..9b71cbf5f 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -24,7 +24,7 @@ proc delNimCache() =
     echo "[Warning] could not delete: ", nimcacheDir
 
 proc runRodFiles(r: var TResults, cat: Category, options: string) =
-  template test(filename: expr): stmt =
+  template test(filename: untyped) =
     testSpec r, makeTest(rodfilesDir / filename, options, cat, actionRun)
 
   delNimCache()
@@ -46,18 +46,19 @@ proc runRodFiles(r: var TResults, cat: Category, options: string) =
   test "deada2"
   delNimCache()
 
-  # test method generation:
-  test "bmethods"
-  test "bmethods2"
-  delNimCache()
+  when false:
+    # test method generation:
+    test "bmethods"
+    test "bmethods2"
+    delNimCache()
 
-  # test generics:
-  test "tgeneric1"
-  test "tgeneric2"
-  delNimCache()
+    # test generics:
+    test "tgeneric1"
+    test "tgeneric2"
+    delNimCache()
 
 proc compileRodFiles(r: var TResults, cat: Category, options: string) =
-  template test(filename: expr): stmt =
+  template test(filename: untyped) =
     testSpec r, makeTest(rodfilesDir / filename, options, cat)
 
   delNimCache()
@@ -114,20 +115,20 @@ proc dllTests(r: var TResults, cat: Category, options: string) =
 # ------------------------------ GC tests -------------------------------------
 
 proc gcTests(r: var TResults, cat: Category, options: string) =
-  template testWithoutMs(filename: expr): stmt =
+  template testWithoutMs(filename: untyped) =
     testSpec r, makeTest("tests/gc" / filename, options, cat, actionRun)
     testSpec r, makeTest("tests/gc" / filename, options &
                   " -d:release", cat, actionRun)
     testSpec r, makeTest("tests/gc" / filename, options &
                   " -d:release -d:useRealtimeGC", cat, actionRun)
 
-  template testWithoutBoehm(filename: expr): stmt =
+  template testWithoutBoehm(filename: untyped) =
     testWithoutMs filename
     testSpec r, makeTest("tests/gc" / filename, options &
                   " --gc:markAndSweep", cat, actionRun)
     testSpec r, makeTest("tests/gc" / filename, options &
                   " -d:release --gc:markAndSweep", cat, actionRun)
-  template test(filename: expr): stmt =
+  template test(filename: untyped) =
     testWithoutBoehm filename
     when not defined(windows):
       # AR: cannot find any boehm.dll on the net, right now, so disabled
@@ -173,7 +174,7 @@ proc longGCTests(r: var TResults, cat: Category, options: string) =
 # ------------------------- threading tests -----------------------------------
 
 proc threadTests(r: var TResults, cat: Category, options: string) =
-  template test(filename: expr): stmt =
+  template test(filename: untyped) =
     testSpec r, makeTest("tests/threads" / filename, options, cat, actionRun)
     testSpec r, makeTest("tests/threads" / filename, options &
       " -d:release", cat, actionRun)
@@ -209,7 +210,7 @@ proc debuggerTests(r: var TResults, cat: Category, options: string) =
 # ------------------------- JS tests ------------------------------------------
 
 proc jsTests(r: var TResults, cat: Category, options: string) =
-  template test(filename: expr): stmt =
+  template test(filename: untyped) =
     testSpec r, makeTest(filename, options & " -d:nodejs", cat,
                          actionRun, targetJS)
     testSpec r, makeTest(filename, options & " -d:nodejs -d:release", cat,
@@ -369,9 +370,8 @@ proc `&?.`(a, b: string): string =
 proc processCategory(r: var TResults, cat: Category, options: string, fileGlob: string = "t*.nim") =
   case cat.string.normalize
   of "rodfiles":
-    discard # Disabled for now
-    #compileRodFiles(r, cat, options)
-    #runRodFiles(r, cat, options)
+    compileRodFiles(r, cat, options)
+    runRodFiles(r, cat, options)
   of "js":
     # XXX JS doesn't need to be special anymore
     jsTests(r, cat, options)