summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-12-01 12:12:40 -0800
committerGitHub <noreply@github.com>2020-12-01 21:12:40 +0100
commite0b4f05053e87b5b498c53338eed643787783b18 (patch)
tree4a7b9b5f1a43436a6686b8e4ab4e2c8b2ba66d70 /tests
parent62eb1312a099aeae0115beb038ed8449ccd095a7 (diff)
downloadNim-e0b4f05053e87b5b498c53338eed643787783b18.tar.gz
nimout now consistently uses nimoutCheck (#16189)
Diffstat (limited to 'tests')
-rw-r--r--tests/casestmt/tcaseexpr1.nim16
-rw-r--r--tests/stdlib/ttestutils.nim6
2 files changed, 14 insertions, 8 deletions
diff --git a/tests/casestmt/tcaseexpr1.nim b/tests/casestmt/tcaseexpr1.nim
index 82af2410b..4f5bbf100 100644
--- a/tests/casestmt/tcaseexpr1.nim
+++ b/tests/casestmt/tcaseexpr1.nim
@@ -3,18 +3,18 @@ discard """
   action: "reject"
   nimout: '''
 tcaseexpr1.nim(33, 10) Error: not all cases are covered; missing: {C}
+tcaseexpr1.nim(39, 12) Error: type mismatch: got <string> but expected 'int literal(10)'
 '''
 """
 
-#[
-# xxx make nimout comparison use nimoutCheck instead of:
-elif expected.nimout.len > 0 and expected.nimout.normalizeMsg notin given.nimout.normalizeMsg:
 
-and then use nimout: '''
-tcaseexpr1.nim(33, 10) Error: not all cases are covered2; missing: {C}
-tcaseexpr1.nim(39, 12) Error: type mismatch: got <string> but expected 'int literal(10)'
-'''
-]#
+
+
+
+
+
+
+
 
 
 # line 20
diff --git a/tests/stdlib/ttestutils.nim b/tests/stdlib/ttestutils.nim
new file mode 100644
index 000000000..1a50d311b
--- /dev/null
+++ b/tests/stdlib/ttestutils.nim
@@ -0,0 +1,6 @@
+import stdtest/testutils
+
+block: # greedyOrderedSubsetLines
+  doAssert greedyOrderedSubsetLines("a1\na3", "a0\na1\na2\na3\na4")
+  doAssert not greedyOrderedSubsetLines("a3\na1", "a0\na1\na2\na3\na4") # out of order
+  doAssert not greedyOrderedSubsetLines("a1\na5", "a0\na1\na2\na3\na4") # a5 not in lhs