mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Tests: Added LR0::Item tests
This commit is contained in:
parent
ef087a7b35
commit
6dea79721a
1 changed files with 16 additions and 3 deletions
|
@ -31,10 +31,23 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int, char**)
|
||||
{
|
||||
UnitTest t (1);
|
||||
t.skip ("No tests");
|
||||
UnitTest t (8);
|
||||
|
||||
// LR0::Item
|
||||
LR0::Item item ({"E", "-->", "E", "*", "B"});
|
||||
t.is (item.dump (), "E --> ● E * B", "E --> ● E * B");
|
||||
|
||||
t.ok (item.advance (), "Item::advance true");
|
||||
t.is (item.dump (), "E --> E ● * B", "E --> E ● * B");
|
||||
|
||||
t.ok (item.advance (), "Item::advance true");
|
||||
t.is (item.dump (), "E --> E * ● B", "E --> E * ● B");
|
||||
|
||||
t.ok (item.advance (), "Item::advance true");
|
||||
t.is (item.dump (), "E --> E * B ●", "E --> E * B ●");
|
||||
|
||||
t.notok (item.advance (), "Item::advance false");
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue