summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorBung <crc32@qq.com>2022-11-05 19:22:45 +0800
committerGitHub <noreply@github.com>2022-11-05 12:22:45 +0100
commit10e7f18d01780c500d2cfc8827e6557579fe3236 (patch)
treeae78dcb447da80031c4d48a462b1a476a77aa15e /tests
parenta3d32a4176539d0829a4e868f4b005a1a71eb7ee (diff)
downloadNim-10e7f18d01780c500d2cfc8827e6557579fe3236.tar.gz
remove compiler/strutils2.nim (#20748)
* use std strutils toLowerAscii char

* avoid additional call and assign

* remove compiler/strutils2.nim

* canonical
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tstrutils2.nim39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/stdlib/tstrutils2.nim b/tests/stdlib/tstrutils2.nim
deleted file mode 100644
index 2cb5b8ec4..000000000
--- a/tests/stdlib/tstrutils2.nim
+++ /dev/null
@@ -1,39 +0,0 @@
-discard """
-  matrix: "--gc:refc; --gc:orc"
-"""
-
-import "$lib/.." / compiler/strutils2
-import std/assertions
-
-block: # setLen
-  var a = "abc"
-  a.setLen 0
-  a.setLen 3, isInit = false
-  when defined(gcRefc): # bug #19763
-    doAssert a[1] == 'b'
-  a.setLen 0
-  a.setLen 3, isInit = true
-  doAssert a[1] == '\0'
-
-block: # forceCopy
-  var a: string
-  a = "foo"
-  when defined(gcRefc):
-    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