jckarter/clay — Issue #174: Fix up examples/shootout/binary-trees
Author: jckarter
Created: 2012-01-09 19:52:31+00:00
State: open

It uses assert() to check its argument list, and it appears to bug out for n >= 18:

```

% ./binarytrees
error: examples/shootout/binarytrees/binarytrees.clay(78,4): assertion size(args) == 2 failed
0 binarytrees 0x000000010b3f4a31 __main__.main(Vector[Vector[Char]]) clay + 1473
zsh: abort ./binarytrees
% ./binarytrees 18
depth = 19
error: examples/shootout/binarytrees/binarytrees.clay(24,4): assertion p.next < size(p.data) failed
0 binarytrees 0x000000010348648e __main__.makeTree(Int32, Int32, Pool[Node]) Pointer[Node] clay + 1358
zsh: abort ./binarytrees 18
% ./binarytrees 17
depth = 18
stretch tree of depth 18	check: -1
262144	trees of depth 4	check: -262144
65536	trees of depth 6	check: -65536
16384	trees of depth 8	check: -16384
4096	trees of depth 10	check: -4096
1024	trees of depth 12	check: -1024
256	trees of depth 14	check: -256
64	trees of depth 16	check: -64
long lived tree of depth 17	check: -1
```