Add test-cases to some fixed issues to close them (#14795)
This commit is contained in:
parent
80952cadaa
commit
0327159344
4 changed files with 35 additions and 0 deletions
|
|
@ -74,3 +74,10 @@ block: # issue #13899
|
||||||
result = true
|
result = true
|
||||||
doAssert waitFor testFooSucceed()
|
doAssert waitFor testFooSucceed()
|
||||||
doAssert waitFor testFooFails()
|
doAssert waitFor testFooFails()
|
||||||
|
|
||||||
|
block: # issue #9313
|
||||||
|
doAssert compiles(block:
|
||||||
|
proc a() {.async.} =
|
||||||
|
echo "Hi"
|
||||||
|
quit(0)
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -762,3 +762,21 @@ block t3717:
|
||||||
|
|
||||||
var f: Foo[Foo[int]]
|
var f: Foo[Foo[int]]
|
||||||
discard foo(f)
|
discard foo(f)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
block: # issue #9458
|
||||||
|
type
|
||||||
|
Option[T] = object
|
||||||
|
val: T
|
||||||
|
has: bool
|
||||||
|
|
||||||
|
Bar = object
|
||||||
|
|
||||||
|
proc none(T: typedesc): Option[T] =
|
||||||
|
discard
|
||||||
|
|
||||||
|
proc foo[T](self: T; x: Option[Bar] = Bar.none) =
|
||||||
|
discard
|
||||||
|
|
||||||
|
foo(1)
|
||||||
|
|
|
||||||
|
|
@ -60,3 +60,9 @@ reject:
|
||||||
reject:
|
reject:
|
||||||
foo seq[int], ss
|
foo seq[int], ss
|
||||||
|
|
||||||
|
# issue #12398
|
||||||
|
reject:
|
||||||
|
let xs = [int, float, string]
|
||||||
|
|
||||||
|
reject:
|
||||||
|
let data = @[int, typedesc]
|
||||||
|
|
|
||||||
|
|
@ -77,5 +77,9 @@ block: # Casts to uint
|
||||||
|
|
||||||
testCast(-5'i32, uint8, 251'u8)
|
testCast(-5'i32, uint8, 251'u8)
|
||||||
|
|
||||||
|
# issue #7174
|
||||||
|
let c = 1'u
|
||||||
|
let val = c > 0
|
||||||
|
doAssert val
|
||||||
|
|
||||||
echo("Success") #OUT Success
|
echo("Success") #OUT Success
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue