summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-11-28 11:09:55 +0100
committerAraq <rumpf_a@web.de>2018-12-11 21:23:19 +0100
commitdec863a85a8bc7ffeaec5ed55e36394b9392016c (patch)
treeea6437e47490ddce28c82100b2c993fc40c277ff
parent465e7421827e752d94d1f283b6ce23f6b4125306 (diff)
downloadNim-dec863a85a8bc7ffeaec5ed55e36394b9392016c.tar.gz
kill testnospec
-rw-r--r--testament/categories.nim10
-rw-r--r--testament/tester.nim8
2 files changed, 7 insertions, 11 deletions
diff --git a/testament/categories.nim b/testament/categories.nim
index 38f61ce33..3d7b6a7d7 100644
--- a/testament/categories.nim
+++ b/testament/categories.nim
@@ -232,7 +232,7 @@ proc asyncTests(r: var TResults, cat: Category, options: string) =
 # ------------------------- debugger tests ------------------------------------
 
 proc debuggerTests(r: var TResults, cat: Category, options: string) =
-  testNoSpec r, makeTest("tools/nimgrep", options & " --debugger:on", cat)
+  testSpec r, makeTest("tools/nimgrep", options & " --debugger:on", cat)
 
 # ------------------------- JS tests ------------------------------------------
 
@@ -355,11 +355,15 @@ proc manyLoc(r: var TResults, cat: Category, options: string) =
       if dir.endsWith"named_argument_bug": continue
       let mainfile = findMainFile(dir)
       if mainfile != "":
-        testNoSpec r, makeTest(mainfile, options, cat)
+        var test = makeTest(mainfile, options, cat)
+        test.spec.action = actionCompile
+        testSpec r, test
 
 proc compileExample(r: var TResults, pattern, options: string, cat: Category) =
   for test in os.walkFiles(pattern):
-    testNoSpec r, makeTest(test, options, cat)
+    var test = makeTest(test, options, cat)
+    test.spec.action = actionCompile
+    testSpec r, test
 
 proc testStdlib(r: var TResults, pattern, options: string, cat: Category) =
   for testFile in os.walkFiles(pattern):
diff --git a/testament/tester.nim b/testament/tester.nim
index 27a3ec089..a82467df7 100644
--- a/testament/tester.nim
+++ b/testament/tester.nim
@@ -443,14 +443,6 @@ proc testSpec(r: var TResults, test: TTest, targets: set[TTarget] = {}) =
       cmpMsgs(r, expected, given, test, target)
       continue
 
-proc testNoSpec(r: var TResults, test: TTest, target = targetC) =
-  # does not extract the spec because the file is not supposed to have any
-  #let tname = test.name.addFileExt(".nim")
-  inc(r.total)
-  let given = callCompiler(cmdTemplate(), test.name, test.options, target)
-  r.addResult(test, target, "", given.msg, given.err)
-  if given.err == reSuccess: inc(r.passed)
-
 proc testC(r: var TResults, test: TTest, action: TTestAction) =
   # runs C code. Doesn't support any specs, just goes by exit code.
   let tname = test.name.addFileExt(".c")