2013-11-12 18:37:02 -08:00
|
|
|
#include "spec_helper.h"
|
|
|
|
|
#include "../test_grammars/arithmetic.h"
|
|
|
|
|
|
|
|
|
|
using namespace tree_sitter::lr;
|
|
|
|
|
|
|
|
|
|
Describe(items) {
|
|
|
|
|
Describe(transitions) {
|
|
|
|
|
Grammar grammar = test_grammars::arithmetic();
|
|
|
|
|
|
|
|
|
|
It(finds_the_item_at_the_start_of_a_rule) {
|
|
|
|
|
Item item = Item::at_beginning_of_rule("expression", grammar);
|
2013-11-13 20:22:06 -08:00
|
|
|
AssertThat(item, Equals(Item("expression", grammar.rule("expression"), 0)));
|
2013-11-12 18:37:02 -08:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|