summary refs log tree commit diff stats
path: root/tests/stdlib/tstrutils2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/tstrutils2.nim')
-rw-r--r--tests/stdlib/tstrutils2.nim32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/stdlib/tstrutils2.nim b/tests/stdlib/tstrutils2.nim
deleted file mode 100644
index 881817f90..000000000
--- a/tests/stdlib/tstrutils2.nim
+++ /dev/null
@@ -1,32 +0,0 @@
-import "$lib/.." / compiler/strutils2
-
-block: # setLen
-  var a = "abc"
-  a.setLen 0
-  a.setLen 3, isInit = false
-  doAssert a[1] == 'b'
-  a.setLen 0
-  a.setLen 3, isInit = true
-  doAssert a[1] == '\0'
-
-block: # forceCopy
-  var a: string
-  a = "foo"
-  shallow(a)
-  var b: string
-  b = a
-  doAssert b[0].addr == a[0].addr
-  var c: string
-  c.forceCopy a
-  doAssert c == a
-  doAssert c[0].addr != a[0].addr
-
-block: # toLowerAscii
-  var a = "fooBAr"
-  a.toLowerAscii
-  doAssert a == "foobar"
-
-block: # dataPointer
-  var a: string
-  discard a.dataPointer
-  # doAssert a.dataPointer == nil # not guaranteed