new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
26
tests/operator/tofopr.nim
Normal file
26
tests/operator/tofopr.nim
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
discard """
|
||||
file: "tofopr.nim"
|
||||
output: "falsetrue"
|
||||
"""
|
||||
# Test is operator
|
||||
|
||||
type
|
||||
TMyType = object {.inheritable.}
|
||||
len: int
|
||||
data: string
|
||||
|
||||
TOtherType = object of TMyType
|
||||
|
||||
proc p(x: TMyType): bool =
|
||||
return x of TOtherType
|
||||
|
||||
var
|
||||
m: TMyType
|
||||
n: TOtherType
|
||||
|
||||
write(stdout, p(m))
|
||||
write(stdout, p(n))
|
||||
|
||||
#OUT falsetrue
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue