diff options
author | Araq <rumpf_a@web.de> | 2014-08-29 01:12:18 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-29 01:12:18 +0200 |
commit | 6713ebcd9808f79d9ccdf02c38c58a17cd9eee9c (patch) | |
tree | bade5adf181d2d11f1025a1f7d578ba19b1370d9 | |
parent | 28c3de7d3e73ab682b74e56210851d8925957c84 (diff) | |
download | Nim-6713ebcd9808f79d9ccdf02c38c58a17cd9eee9c.tar.gz |
tester compiles again
-rw-r--r-- | tests/actiontable/tactiontable2.nim | 2 | ||||
-rw-r--r-- | tests/assert/tassert.nim | 2 | ||||
-rw-r--r-- | tests/testament/categories.nim | 20 | ||||
-rw-r--r-- | tests/testament/specs.nim | 2 | ||||
-rw-r--r-- | tests/testament/tester.nim | 18 |
5 files changed, 22 insertions, 22 deletions
diff --git a/tests/actiontable/tactiontable2.nim b/tests/actiontable/tactiontable2.nim index bfeb1c169..99bb3dca0 100644 --- a/tests/actiontable/tactiontable2.nim +++ b/tests/actiontable/tactiontable2.nim @@ -1,6 +1,6 @@ discard """ line: 21 - errormsg: "invalid type: 'TTable[string, proc (string){.gcsafe.}]'" + errormsg: "invalid type: 'Table[string, proc (string){.gcsafe.}]'" """ import tables diff --git a/tests/assert/tassert.nim b/tests/assert/tassert.nim index 0ea8d2034..b3df30bd1 100644 --- a/tests/assert/tassert.nim +++ b/tests/assert/tassert.nim @@ -5,7 +5,7 @@ discard """ """ # test assert and exception handling -proc callB() = assert(False) +proc callB() = assert(false) proc callA() = callB() proc callC() = callA() diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index 02f7dc1d7..a81e4687a 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -1,6 +1,6 @@ # # -# Nimrod Tester +# Nim Tester # (c) Copyright 2014 Andreas Rumpf # # See the file "copying.txt", included in this @@ -20,7 +20,7 @@ const proc delNimCache() = try: removeDir(nimcacheDir) - except EOS: + except OSError: echo "[Warning] could not delete: ", nimcacheDir proc runRodFiles(r: var TResults, cat: Category, options: string) = @@ -71,7 +71,7 @@ proc compileRodFiles(r: var TResults, cat: Category, options: string) = proc safeCopyFile(src, dest: string) = try: copyFile(src, dest) - except EOS: + except OSError: echo "[Warning] could not copy: ", src, " to ", dest proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) = @@ -236,8 +236,8 @@ let packageDir = babelDir / "pkgs" packageIndex = babelDir / "packages.json" -proc waitForExitEx(p: PProcess): int = - var outp: PStream = outputStream(p) +proc waitForExitEx(p: Process): int = + var outp = outputStream(p) var line = newStringOfCap(120).TaintedString while true: if outp.readLine(line): @@ -250,7 +250,7 @@ proc waitForExitEx(p: PProcess): int = proc getPackageDir(package: string): string = ## TODO - Replace this with dom's version comparison magic. var commandOutput = execCmdEx("babel path $#" % package) - if commandOutput.exitCode != quitSuccess: + if commandOutput.exitCode != QuitSuccess: return "" else: result = commandOutput[0].string @@ -278,7 +278,7 @@ proc testBabelPackages(r: var TResults, cat: Category, filter: PackageFilter) = echo("[Warning] - Cannot run babel tests: Babel binary not found.") return - if execCmd("$# update" % babelExe) == quitFailure: + if execCmd("$# update" % babelExe) == QuitFailure: echo("[Warning] - Cannot run babel tests: Babel update failed.") return @@ -291,7 +291,7 @@ proc testBabelPackages(r: var TResults, cat: Category, filter: PackageFilter) = installProcess = startProcess(babelExe, "", ["install", "-y", name]) installStatus = waitForExitEx(installProcess) installProcess.close - if installStatus != quitSuccess: + if installStatus != QuitSuccess: r.addResult(test, "", "", reInstallFailed) continue @@ -301,11 +301,11 @@ proc testBabelPackages(r: var TResults, cat: Category, filter: PackageFilter) = buildProcess = startProcess(babelExe, buildPath, ["build"]) buildStatus = waitForExitEx(buildProcess) buildProcess.close - if buildStatus != quitSuccess: + if buildStatus != QuitSuccess: r.addResult(test, "", "", reBuildFailed) r.addResult(test, "", "", reSuccess) r.addResult(packageFileTest, "", "", reSuccess) - except EJsonParsingError: + except JsonParsingError: echo("[Warning] - Cannot run babel tests: Invalid package file.") r.addResult(packageFileTest, "", "", reBuildFailed) diff --git a/tests/testament/specs.nim b/tests/testament/specs.nim index f02b26f5b..b2cccca56 100644 --- a/tests/testament/specs.nim +++ b/tests/testament/specs.nim @@ -1,6 +1,6 @@ # # -# Nimrod Tester +# Nim Tester # (c) Copyright 2014 Andreas Rumpf # # See the file "copying.txt", included in this diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim index fc6b4ff95..732a5e86a 100644 --- a/tests/testament/tester.nim +++ b/tests/testament/tester.nim @@ -1,6 +1,6 @@ # # -# Nimrod Tester +# Nim Tester # (c) Copyright 2014 Andreas Rumpf # # See the file "copying.txt", included in this @@ -146,9 +146,9 @@ proc codegenCheck(test: TTest, check: string, given: var TSpec) = let contents = readFile(genFile).string if contents.find(check.peg) < 0: given.err = reCodegenFailure - except EInvalidValue: + except ValueError: given.err = reInvalidPeg - except EIO: + except IOError: given.err = reCodeNotFound proc makeDeterministic(s: string): string = @@ -193,7 +193,7 @@ proc testSpec(r: var TResults, test: TTest) = return var (buf, exitCode) = execCmdEx( (if test.target == targetJS: "nodejs " else: "") & exeFile) - if exitCode != expected.ExitCode: + if exitCode != expected.exitCode: r.addResult(test, "exitcode: " & $expected.exitCode, "exitcode: " & $exitCode, reExitCodesDiffer) else: @@ -246,15 +246,15 @@ proc main() = if p.kind == cmdLongoption: case p.key.string.normalize of "print", "verbose": optPrintResults = true - else: quit usage + else: quit Usage p.next() - if p.kind != cmdArgument: quit usage + if p.kind != cmdArgument: quit Usage var action = p.key.string.normalize p.next() var r = initResults() case action of "all": - let testsDir = "tests" & dirSep + let testsDir = "tests" & DirSep for kind, dir in walkDir(testsDir): assert testsDir.startsWith(testsDir) let cat = dir[testsDir.len .. -1] @@ -272,7 +272,7 @@ proc main() = generateHtml(resultsFile, commit) generateJson(jsonFile, commit) else: - quit usage + quit Usage if optPrintResults: if action == "html": openDefaultBrowser(resultsFile) @@ -280,6 +280,6 @@ proc main() = backend.close() if paramCount() == 0: - quit usage + quit Usage main() |