mirror of https://github.com/deavmi/niknaks
Compare commits
2 Commits
ce78102af9
...
838ddbb9db
Author | SHA1 | Date |
---|---|---|
Tristan B. Velloza Kildaire | 838ddbb9db | |
Tristan B. Velloza Kildaire | e44caf3643 |
|
@ -747,6 +747,11 @@ unittest
|
|||
|
||||
string[] result = treeOfStrings.dfs(strat, touch);
|
||||
writeln("dfs: ", result);
|
||||
|
||||
assert(result[0] == "1");
|
||||
assert(result[1] == "2");
|
||||
assert(result[2] == "3");
|
||||
assert(result[3] == "Top");
|
||||
}
|
||||
|
||||
public class VisitationTree(T) : Tree!(T)
|
||||
|
@ -797,6 +802,10 @@ unittest
|
|||
root.appendNode(thing);
|
||||
thing.appendNode(root);
|
||||
|
||||
writeln(root.linearize());
|
||||
string[] linearized = root.linearize();
|
||||
writeln(linearized);
|
||||
|
||||
assert(linearized[0] == "subtree");
|
||||
assert(linearized[1] == "root");
|
||||
|
||||
}
|
Loading…
Reference in New Issue