summary refs log tree commit diff stats
path: root/tests/system/tostring.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system/tostring.nim')
-rw-r--r--tests/system/tostring.nim10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/system/tostring.nim b/tests/system/tostring.nim
index 9a6b83f95..99299f203 100644
--- a/tests/system/tostring.nim
+++ b/tests/system/tostring.nim
@@ -26,8 +26,8 @@ doAssert "nan" == $(0.0/0.0)
 var x: seq[string]
 doAssert "nil" == $(x)
 
-var y: string = nil
-doAssert nil == $(y)
+var y: string
+doAssert "" == $(y)
 
 type
   Foo = object
@@ -54,7 +54,7 @@ doAssert $arr == "['H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!', '
 doAssert $cstring(unsafeAddr arr) == "Hello World!"
 
 proc takes(c: cstring) =
-  doAssert c == ""
+  doAssert c == cstring""
 
 proc testm() =
   var x: string
@@ -90,12 +90,8 @@ proc stringCompare() =
 
   doAssert e == ""
   doAssert "" == e
-  doAssert nil == e
-  doAssert e == nil
   doAssert f == g
   doAssert "" == ""
-  doAssert "" == nil
-  doAssert nil == ""
 
   g.setLen(10)
   doAssert g == "\0\0\0\0\0\0\0\0\0\0"