Fixes #2889. Merges *tostring tests in tests/system.

This commit is contained in:
Dominik Picheta 2015-09-23 00:04:31 +01:00
commit 371470e73f
4 changed files with 37 additions and 32 deletions

View file

@ -2235,7 +2235,9 @@ proc `$`*[T: tuple|object](x: T): string =
firstElement = false
result.add(")")
proc collectionToString[T](x: T, b, e: string): string =
proc collectionToString[T: set | seq](x: T, b, e: string): string =
when x is seq:
if x.isNil: return "nil"
result = b
var firstElement = true
for value in items(x):