fix #16256: nimout: <empty> should give error (vacuously true); improve a few tests (#18089)

* fix #16256: nimout: <empty> should give error (vacuously true); improve some tests

* renamed:    tests/stdlib/t9710.nim -> tests/misc/t9710.nim

* improve tests

* fix non-DRY tests

* improve $nim_prs_D/tests/stdlib/t9091.nim

* renamed:    tests/stdlib/t9091.nim -> tests/misc/t9091.nim

* fixup

* address comment: doAssert => result.parseErrors
This commit is contained in:
Timothee Cour 2021-05-31 04:39:19 -07:00 • committed by GitHub
commit a36efb59b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 73 additions and 106 deletions

View file

@ -1,36 +0,0 @@
discard """
targets: "c"
output: "test AObj"
action: "compile"
exitcode: 0
timeout: 60.0
"""
import streams
block:
type Mine = ref object
a: int
proc write(io: Stream, t: Mine) =
io.write("sure")
let str = newStringStream()
let mi = new Mine
str.write(mi)
block:
type
AObj = object
x: int
proc foo(a: int): string = ""
proc test(args: varargs[string, foo]) =
echo "varargs"
proc test(a: AObj) =
echo "test AObj"
let x = AObj()
test(x)