assertEquals("Test production priority", grammar.getPriority(b), grammar.getPriority(p1));
}
public void testAssociativities()
{
Associativity left = Associativity.LEFT;
Associativity right = Associativity.RIGHT;
Associativity nonassoc = Associativity.NONASSOC;
assertEquals("Test if associativities are equal", left, new Associativity("left"));
assertEquals("Test if associativities are equal", right, new Associativity("right"));
assertEquals("Test if associativities are equal", nonassoc, new Associativity("nonassoc"));
assertTrue("Test if associativities are not equal", !left.equals(right));
assertTrue("Test if associativities are not equal", !right.equals(nonassoc));
assertTrue("Test if associativities are not equal", !nonassoc.equals(left));
assertEquals("Test production associativities", nonassoc, grammar.getAssociativity(p1));
assertEquals("Test production associativities", nonassoc, grammar.getAssociativity(p2));
assertEquals("Test production associativities", nonassoc, grammar.getAssociativity(p3));