new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
|
|
@ -1,32 +0,0 @@
|
|||
# test the new "repr" built-in proc
|
||||
|
||||
type
|
||||
TEnum = enum
|
||||
en1, en2, en3, en4, en5, en6
|
||||
|
||||
TPoint {.final.} = object
|
||||
x, y, z: int
|
||||
s: array [0..1, string]
|
||||
e: TEnum
|
||||
|
||||
var
|
||||
p: TPoint
|
||||
q: ref TPoint
|
||||
s: seq[ref TPoint]
|
||||
|
||||
p.x = 0
|
||||
p.y = 13
|
||||
p.z = 45
|
||||
p.s[0] = "abc"
|
||||
p.s[1] = "xyz"
|
||||
p.e = en6
|
||||
|
||||
new(q)
|
||||
q[] = p
|
||||
|
||||
s = @[q, q, q, q]
|
||||
|
||||
writeln(stdout, repr(p))
|
||||
writeln(stdout, repr(q))
|
||||
writeln(stdout, repr(s))
|
||||
writeln(stdout, repr(en4))
|
||||
Loading…
Add table
Add a link
Reference in a new issue