diff options
Diffstat (limited to 'tests/system/tostring.nim')
-rw-r--r-- | tests/system/tostring.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/system/tostring.nim b/tests/system/tostring.nim index fa82acc3b..bb6e453fb 100644 --- a/tests/system/tostring.nim +++ b/tests/system/tostring.nim @@ -47,7 +47,7 @@ import strutils 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', '!', '\\x00']" -doAssert $cstring(unsafeAddr arr) == "Hello World!" +doAssert $cast[cstring](addr arr) == "Hello World!" proc takes(c: cstring) = doAssert c == cstring"" @@ -68,7 +68,7 @@ doAssert yy == "" proc bar(arg: cstring) = doAssert arg[0] == '\0' -proc baz(arg: openarray[char]) = +proc baz(arg: openArray[char]) = doAssert arg.len == 0 proc stringCompare() = |