use of org.h2.value.ValueDouble in project h2database by h2database.
the class TestValue method testModulusDouble.
private void testModulusDouble() {
final ValueDouble vd1 = ValueDouble.get(12);
new AssertThrows(ErrorCode.DIVISION_BY_ZERO_1) {
@Override
public void test() {
vd1.modulus(ValueDouble.get(0));
}
};
ValueDouble vd2 = ValueDouble.get(10);
ValueDouble vd3 = vd1.modulus(vd2);
assertEquals(2, vd3.getDouble());
}
use of org.h2.value.ValueDouble in project h2database by h2database.
the class TestValueHashMap method testNotANumber.
private void testNotANumber() {
ValueHashMap<Integer> map = ValueHashMap.newInstance();
for (int i = 1; i < 100; i++) {
double d = Double.longBitsToDouble(0x7ff0000000000000L | i);
ValueDouble v = ValueDouble.get(d);
map.put(v, null);
assertEquals(1, map.size());
}
}
Aggregations