Skip to content

Commit ccb2a4c

Browse files
committed
fixup
1 parent 178a49e commit ccb2a4c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

testament/important_packages.nim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ template pkg(name: string; cmd = "nimble test"; hasDeps = false; url = ""): unty
55
var packages*: seq[tuple[name, cmd: string; hasDeps: bool; url: string]] = @[]
66

77
proc toCommand(cmd: string): string =
8-
# refs https://github.com/nim-lang/Nim/pull/13408
8+
## useful for running shell commands, eg in case a package is broken and needs
9+
## a hotfix you can write:
10+
## pkg "foo", "git checkout hotfix && nimble test".toCommand, url = "https://github.com/username/foo"
11+
## see also: https://github.com/nim-lang/Nim/pull/13408
912
when defined(windows): "cmd /c " & cmd else: cmd
1013

1114
pkg "argparse"
@@ -39,7 +42,7 @@ pkg "gnuplot"
3942
pkg "hts", "nim c -o:htss src/hts.nim"
4043
pkg "illwill", "nimble examples"
4144
pkg "inim"
42-
pkg "itertools", "git checkout pr_fix_for_new_hashes && nim doc src/itertools.nim".toCommand, url = "https://github.com/timotheecour/itertools"
45+
pkg "itertools", "nim doc src/itertools.nim"
4346
pkg "iterutils"
4447
pkg "jstin"
4548
pkg "karax", "nim c -r tests/tester.nim"

tests/collections/ttables.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ block tablesref:
227227
block tableTest1:
228228
var t = newTable[tuple[x, y: int], string]()
229229
t[(0,0)] = "00"
230+
doAssert $t == """{(x: 0, y: 0): "00"}"""
230231
t[(1,0)] = "10"
231232
t[(0,1)] = "01"
232233
t[(1,1)] = "11"
233234
for x in 0..1:
234235
for y in 0..1:
235236
assert t[(x,y)] == $x & $y
236-
assert($t ==
237-
"""{(x: 0, y: 1): "01", (x: 1, y: 0): "10", (x: 0, y: 0): "00", (x: 1, y: 1): "11"}""")
237+
doAssert toSeq(t.pairs).sorted == @[((x: 0, y: 0), "00"), ((x: 0, y: 1), "01"), ((x: 1, y: 0), "10"), ((x: 1, y: 1), "11")]
238238

239239
block tableTest2:
240240
var t = newTable[string, float]()

tests/collections/ttablesthreads.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ discard """
33
output: '''true'''
44
"""
55

6-
import hashes, tables, sharedtables
6+
import hashes, tables, sharedtables, sequtils, algorithm
77

88
const
99
data = {
@@ -47,8 +47,8 @@ block tableTest1:
4747
for x in 0..1:
4848
for y in 0..1:
4949
assert t[(x,y)] == $x & $y
50-
assert($t ==
51-
"""{(x: 0, y: 1): "01", (x: 1, y: 0): "10", (x: 0, y: 0): "00", (x: 1, y: 1): "11"}""")
50+
doAssert toSeq(t.pairs).sorted ==
51+
@[((x: 0, y: 0), "00"), ((x: 0, y: 1), "01"), ((x: 1, y: 0), "10"), ((x: 1, y: 1), "11")]
5252

5353
block tableTest2:
5454
var t = initTable[string, float]()

tests/vm/tcompiletimetable.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ block:
6464
proc fun(): string =
6565
var t: Table[T, string]
6666
let n = 10
67-
for i in 0..<n:
67+
for i in 0.int64..<n.int64:
6868
let i2 = when T.sizeof == type(i).sizeof: i else: i.int32
6969
let k = cast[T](i2)
7070
# cast intentional for regression testing,

0 commit comments

Comments
 (0)