assertTypeAndValue("FLOAT('1.0') * IF (TRUE) THEN SHORT('4') + LONG('5') ELSE 10 END", Float.class, (float)9.0);
assertTypeAndValue("FLOAT('1.0') * IF (FALSE) THEN SHORT('4') + LONG('5') ELSE Integer('10') END", Float.class, (float)10.0);
assertTypeAndValue("5.0+ FLOAT('4.0') + LONG('5')", Double.class, 14.0);
SelectExpressionContext elem = parseSelectElement(":a + :b");
elem.setParameter("a", (short)2);
elem.setParameter("b", (short)4);
assertTypeAndValue(elem, Short.class, (short)6);
elem.setParameter("a", (short)2);
elem.setParameter("b", (int)4);
assertTypeAndValue(elem, Integer.class, (int)6);
elem.setParameter("a", (int)2);
elem.setParameter("b", (int)4);
assertTypeAndValue(elem, Integer.class, (int)6);
elem.setParameter("a", (long)2);
elem.setParameter("b", (long)4);
assertTypeAndValue(elem, Long.class, (long)6);
elem.setParameter("a", (long)2);
elem.setParameter("b", (float)4);
assertTypeAndValue(elem, Float.class, (float)6);
elem.setParameter("a", (float)2.0);
elem.setParameter("b", (float)4.0);
assertTypeAndValue(elem, Float.class, (float)6.0);
elem.setParameter("a", (double)2.0);
elem.setParameter("b", (double)4.0);
assertTypeAndValue(elem, Double.class, (double)6.0);
elem.setParameter("a", "aa");
elem.setParameter("b", "bb");
assertTypeAndValue(elem, String.class, "aabb");
}