mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Tests: Added LR0::Item::next
This commit is contained in:
parent
d8096d2fa8
commit
9327ff7c8b
1 changed files with 11 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int, char**)
|
||||
{
|
||||
UnitTest t (13);
|
||||
UnitTest t (21);
|
||||
|
||||
// LR0::Item.
|
||||
LR0::Item item1 ({"E", "-->", "E", "*", "B"});
|
||||
|
@ -56,6 +56,16 @@ int main (int, char**)
|
|||
t.notok (item2.advance (), "Item::advance false");
|
||||
t.ok (item2.done (), "Item::done true");
|
||||
|
||||
LR0::Item item3 ({"E", "-->", "E", "*", "B"});
|
||||
t.is (item3.next (), "E", "Item::next E");
|
||||
t.ok (item3.advance (), "Item::advance true");
|
||||
t.is (item3.next (), "*", "Item::next *");
|
||||
t.ok (item3.advance (), "Item::advance true");
|
||||
t.is (item3.next (), "B", "Item::next B");
|
||||
t.ok (item3.advance (), "Item::advance true");
|
||||
t.notok (item3.advance (), "Item::advance false");
|
||||
t.ok (item3.done (), "Item::done true");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue