@Test
public void testLubAndGlb() {
Set<Type> types = new HashSet<Type>();
RandomType rg = new RandomType();
rg.plusRascalTypes(true);
for(int i = 0; i <= 1000; i++) {
types.add(rg.getFunctionType(2));
types.add(rg.getReifiedType(5));
types.add(rg.getOverloadedFunctionType(2));
}
for (Type t : types) {
if (t.lub(t) != t) {
fail("lub should be idempotent: " + t + " != " + t.lub(t));