summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2015-09-23 00:04:31 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2015-09-23 00:04:31 +0100
commit371470e73f2c79f4d9babc86f59b5d580defb050 (patch)
tree904d755549c5f59e5c866431e6e11fbf0a0d471c /tests
parent990812760a260f5ee8af753b9fb8fb87c6fb320a (diff)
downloadNim-371470e73f2c79f4d9babc86f59b5d580defb050.tar.gz
Fixes #2889. Merges *tostring tests in tests/system.
Diffstat (limited to 'tests')
-rw-r--r--tests/system/tfloatToString.nim22
-rw-r--r--tests/system/toString.nim35
-rw-r--r--tests/system/tsettostring.nim8
3 files changed, 34 insertions, 31 deletions
diff --git a/tests/system/tfloatToString.nim b/tests/system/tfloatToString.nim
deleted file mode 100644
index bb45a91d7..000000000
--- a/tests/system/tfloatToString.nim
+++ /dev/null
@@ -1,22 +0,0 @@
-discard """
-  output:'''2.3242
-2.982
-123912.1
-123912.1823
-5.0
-1e+100
-inf
--inf
-nan
-'''
-"""
-
-echo($(2.3242))
-echo($(2.982))
-echo($(123912.1))
-echo($(123912.1823))
-echo($(5.0))
-echo($(1e100))
-echo($(1e1000000))
-echo($(-1e1000000))
-echo($(0.0/0.0))
diff --git a/tests/system/toString.nim b/tests/system/toString.nim
index 52e7a4b92..a2337f5dd 100644
--- a/tests/system/toString.nim
+++ b/tests/system/toString.nim
@@ -1,9 +1,42 @@
 discard """
   output:'''@[23, 45]
-@[, foo, bar]'''
+@[, foo, bar]
+{a, b, c}
+2.3242
+2.982
+123912.1
+123912.1823
+5.0
+1e+100
+inf
+-inf
+nan
+nil
+nil'''
 """
 
 echo($(@[23, 45]))
 echo($(@["", "foo", "bar"]))
 #echo($(["", "foo", "bar"]))
 #echo($([23, 45]))
+
+# bug #2395
+
+let alphaSet: set[char] = {'a'..'c'}
+echo alphaSet
+
+echo($(2.3242))
+echo($(2.982))
+echo($(123912.1))
+echo($(123912.1823))
+echo($(5.0))
+echo($(1e100))
+echo($(1e1000000))
+echo($(-1e1000000))
+echo($(0.0/0.0))
+
+# nil tests
+var x: seq[string]
+var y: string
+echo(x)
+echo(y)
diff --git a/tests/system/tsettostring.nim b/tests/system/tsettostring.nim
deleted file mode 100644
index c6846ee99..000000000
--- a/tests/system/tsettostring.nim
+++ /dev/null
@@ -1,8 +0,0 @@
-discard """
-  output: "{a, b, c}"
-"""
-
-# bug #2395
-
-let alphaSet: set[char] = {'a'..'c'}
-echo alphaSet