mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- The lisp.t.cpp tests were written for an older and different Tree object. This change brings it more up to date.
This commit is contained in:
parent
f0a5c917c9
commit
3d5656fb57
1 changed files with 6 additions and 6 deletions
|
@ -42,10 +42,10 @@ int main (int argc, char** argv)
|
|||
// -> no child nodes
|
||||
Lisp l;
|
||||
Tree* t = l.parse ("(one)");
|
||||
// TODO When tegelsten/Tree is merged in, uncomment this.
|
||||
t->dump ();
|
||||
//t->dump ();
|
||||
|
||||
test.is (t->branches (), 1, "(one) -> 1 node under root");
|
||||
test.is ((*t)[0]->tags (), 0, "(one) -> 0 tags");
|
||||
test.is ((*t)[0]->tags (), 1, "(one) -> 1 tag");
|
||||
test.is ((*t)[0]->branches (), 0, "(one) -> 0 child nodes");
|
||||
delete t;
|
||||
|
||||
|
@ -53,10 +53,10 @@ int main (int argc, char** argv)
|
|||
// t -> "one" (tag: "two")
|
||||
// -> no child nodes
|
||||
t = l.parse ("(one two)");
|
||||
// TODO When tegelsten/Tree is merged in, uncomment this.
|
||||
t->dump ();
|
||||
//t->dump ();
|
||||
|
||||
test.is (t->branches (), 1, "(one two) -> 1 node under root");
|
||||
test.is ((*t)[0]->tags (), 1, "(one) -> 1 tag");
|
||||
test.is ((*t)[0]->tags (), 2, "(one) -> 2 tags");
|
||||
test.is ((*t)[0]->branches (), 0, "(one two) -> 0 child nodes");
|
||||
delete t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue