nimout now consistently uses nimoutCheck (#16189)

This commit is contained in:
Timothee Cour 2020-12-01 12:12:40 -08:00 • committed by GitHub
commit e0b4f05053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 20 deletions

View file

@ -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

View file

@ -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