private void assertTypeLessThan(Type<?> a, Type<?> b) { assertTrue(a.compareTo(b) < 0); assertTrue(b.compareTo(a) > 0); if (a.tag() > b.tag()) { fail("Types should be ordered by increasing tag value"); } if (b.tag() == a.tag() && a.isArray() && !b.isArray()) { fail("If their tag is the same, types should be ordered by multiplicity"); } }
private void assertTypeEqual(Type<?> a, Type<?> b) { assertTrue(a.compareTo(b) == 0); assertTrue(a.tag() == b.tag()); assertTrue(a.isArray() == b.isArray()); }