Improved collection-to-string behavior (#6825)
This commit is contained in:
parent
bc1123536e
commit
6df6ec27ec
33 changed files with 226 additions and 74 deletions
|
|
@ -47,7 +47,7 @@ block tableTest1:
|
|||
for y in 0..1:
|
||||
assert t[(x,y)] == $x & $y
|
||||
assert($t ==
|
||||
"{(x: 0, y: 1): 01, (x: 0, y: 0): 00, (x: 1, y: 0): 10, (x: 1, y: 1): 11}")
|
||||
"{(x: 0, y: 1): \"01\", (x: 0, y: 0): \"00\", (x: 1, y: 0): \"10\", (x: 1, y: 1): \"11\"}")
|
||||
|
||||
block tableTest2:
|
||||
var t = newTable[string, float]()
|
||||
|
|
@ -139,7 +139,7 @@ proc orderedTableSortTest() =
|
|||
block anonZipTest:
|
||||
let keys = @['a','b','c']
|
||||
let values = @[1, 2, 3]
|
||||
doAssert "{a: 1, b: 2, c: 3}" == $ toTable zip(keys, values)
|
||||
doAssert "{'a': 1, 'b': 2, 'c': 3}" == $ toTable zip(keys, values)
|
||||
|
||||
block clearTableTest:
|
||||
var t = newTable[string, float]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue