summary refs log tree commit diff stats
path: root/tests/accept/run/tbintre2.nim
blob: 2a7225411518a3e6f7d6fee51748e09f54b51197 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
discard """
  file: "tbintre2.nim"
  output: "helloworld99110223"
"""
# Same test, but check module boundaries

import tbintree

var
  root: PBinaryTree[string]
  x = newNode("hello")
add(root, x)
add(root, "world")
if find(root, "world"):
  for str in items(root):
    stdout.write(str)
else:
  stdout.writeln("BUG")

var
  r2: PBinaryTree[int]
add(r2, newNode(110))
add(r2, 223)
add(r2, 99)
for y in items(r2):
  stdout.write(y)

#OUT helloworld99110223