summary refs log tree commit diff stats
path: root/tests/system
diff options
context:
space:
mode:
authorFabian Keller <bluenote10@users.noreply.github.com>2017-12-14 14:02:13 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-12-14 14:02:13 +0100
commit6df6ec27ec573fc7f619f7bf9fece6d6b0dc931f (patch)
treef9eadca2e1b46112ec11da257cb664010a369a8d /tests/system
parentbc1123536e36a222dc3bf65c40c6ceee07da6499 (diff)
downloadNim-6df6ec27ec573fc7f619f7bf9fece6d6b0dc931f.tar.gz
Improved collection-to-string behavior (#6825)
Diffstat (limited to 'tests/system')
-rw-r--r--tests/system/toString.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/system/toString.nim b/tests/system/toString.nim
index 3e7fc7ddb..ea9d6b05b 100644
--- a/tests/system/toString.nim
+++ b/tests/system/toString.nim
@@ -4,12 +4,12 @@ discard """
 
 doAssert "@[23, 45]" == $(@[23, 45])
 doAssert "[32, 45]" == $([32, 45])
-doAssert "@[, foo, bar]" == $(@["", "foo", "bar"])
-doAssert "[, foo, bar]" ==  $(["", "foo", "bar"])
+doAssert """@["", "foo", "bar"]""" == $(@["", "foo", "bar"])
+doAssert """["", "foo", "bar"]""" ==  $(["", "foo", "bar"])
 
 # bug #2395
 let alphaSet: set[char] = {'a'..'c'}
-doAssert "{a, b, c}" == $alphaSet
+doAssert "{'a', 'b', 'c'}" == $alphaSet
 doAssert "2.3242" == $(2.3242)
 doAssert "2.982" == $(2.982)
 doAssert "123912.1" == $(123912.1)
@@ -49,5 +49,5 @@ import strutils
 # array test
 
 let arr = ['H','e','l','l','o',' ','W','o','r','l','d','!','\0']
-doAssert $arr == "[H, e, l, l, o,  , W, o, r, l, d, !, \0]"
+doAssert $arr == "['H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!', '\\x00']"
 doAssert $cstring(unsafeAddr arr) == "Hello World!"