Skip to content

Commit aef7716

Browse files
committed
Upgrades tests to unittest2
1 parent 7e914eb commit aef7716

9 files changed

+18
-13
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"projectFile": "nimlangserver.nim",
44
"fileRegex": ".*\\.nim"
55
}
6-
]
6+
],
7+
"nim.test.entryPoint": "tests/all.nim"
78
}

nimble.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
}
128128
},
129129
"chronos": {
130-
"version": "4.0.4",
131-
"vcsRevision": "0646c444fce7c7ed08ef6f2c9a7abfd172ffe655",
130+
"version": "4.0.3",
131+
"vcsRevision": "36d8ee5617fbd9747726688fce72fcd215628937",
132132
"url": "https://github.com/status-im/nim-chronos",
133133
"downloadMethod": "git",
134134
"dependencies": [
@@ -139,7 +139,7 @@
139139
"unittest2"
140140
],
141141
"checksums": {
142-
"sha1": "455802a90204d8ad6b31d53f2efff8ebfe4c834a"
142+
"sha1": "fd6062c492e5b6053702638159d38d1219b4bf72"
143143
}
144144
},
145145
"nimcrypto": {
@@ -217,7 +217,7 @@
217217
},
218218
"nim": {
219219
"version": "2.0.8",
220-
"vcsRevision": "",
220+
"vcsRevision": "5935c3bfa9fec6505394867b23510eb5cbab3dbf",
221221
"url": "https://github.com/nim-lang/Nim.git",
222222
"downloadMethod": "git",
223223
"dependencies": [],

nimlangserver.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ skipDirs = @["tests"]
1010

1111
requires "nim == 2.0.8",
1212
"chronos >= 4.0.4", "json_rpc >= 0.5.0", "with", "chronicles", "serialization",
13-
"json_serialization", "stew", "regex"
13+
"json_serialization", "stew", "regex","unittest2 >= 0.2.4"
1414

1515
--path:
1616
"."

tests/textensions.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import ../[nimlangserver, ls, lstransports, utils]
22
import ../protocol/[enums, types]
33
import
4-
std/[options, unittest, json, os, jsonutils, sequtils, strutils, sugar, strformat]
4+
std/[options, json, os, jsonutils, sequtils, strutils, sugar, strformat]
55
import json_rpc/[rpcclient]
66
import chronicles
77
import lspsocketclient
88
import chronos/asyncproc
99
import testhelpers
10+
import unittest2
1011

1112
suite "Nimlangserver extensions":
1213
let cmdParams = CommandLineParams(transport: some socket, port: getNextFreePort())

tests/tmisc.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import ../[nimlangserver, ls, lstransports, utils]
22
import ../protocol/[enums, types]
33
import
4-
std/[options, unittest, json, os, jsonutils, sequtils, strutils, sugar, strformat]
4+
std/[options, json, os, jsonutils, sequtils, strutils, sugar, strformat]
55
import json_rpc/[rpcclient]
66
import chronicles
77
import lspsocketclient
88
import chronos/asyncproc
9+
import unittest2
910

1011
suite "Nimlangserver misc":
1112
let cmdParams = CommandLineParams(transport: some socket, port: getNextFreePort())

tests/tnimlangserver.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import ../[
22
nimlangserver, ls, lstransports, utils
33
]
44
import ../protocol/[enums, types]
5-
import std/[options, unittest, json, os, jsonutils, sequtils, strutils, sugar, strformat]
5+
import std/[options, json, os, jsonutils, sequtils, strutils, sugar, strformat]
66
import json_rpc/[rpcclient]
77
import chronicles
88
import lspsocketclient
9-
9+
import unittest2
1010

1111
suite "Nimlangserver":
1212
let cmdParams = CommandLineParams(transport: some socket, port: getNextFreePort())

tests/tprojectsetup.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import ../protocol/[enums, types]
33
import
44
std/
55
[
6-
options, unittest, json, os, jsonutils, sequtils, strutils, sugar, strformat
6+
options, json, os, jsonutils, sequtils, strutils, sugar, strformat
77
]
88
import json_rpc/[rpcclient]
99
import chronicles
1010
import lspsocketclient
1111
import testhelpers
12+
import unittest2
1213

1314
suite "nimble setup":
1415
let cmdParams = CommandLineParams(transport: some socket, port: getNextFreePort())

tests/tsuggestapi.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import
2-
../suggestapi, unittest, os, std/asyncnet, strutils, chronos, options
2+
../suggestapi, os, std/asyncnet, strutils, chronos, options
3+
import unittest2
34

45
const inputLine = "def skProc hw.a proc (){.noSideEffect, gcsafe.} hw/hw.nim 1 5 \"\" 100"
56
const inputLineWithEndLine = "outline skEnumField system.bool.true bool basic_types.nim 46 15 \"\" 100 4 11"

tests/ttestrunner.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import unittest
21
import std/[os, osproc, strscans, tables, sequtils, enumerate, strutils, options]
32
import testhelpers
43
import testrunner
54
import chronos
65
import ls
6+
import unittest2
77

88
suite "Test Parser":
99
test "should be able to list tests from an entry point":

0 commit comments

Comments
 (0)