diff --git a/tests/stdlib/num-hash.dora b/tests/stdlib/num-hash.dora index b89216b4e..e081a1e54 100644 --- a/tests/stdlib/num-hash.dora +++ b/tests/stdlib/num-hash.dora @@ -2,9 +2,12 @@ fn main() { assert(true.hash() == 1i32); assert(false.hash() == 0i32); assert(1.toUInt8().hash() == 1i32); - assert(1.hash() == 1i32); + assert(1i32.hash() == 1i32); + assert(1i64.hash() == 1i32); + assert((1 << 32i).hash() == (1 ^ 0)); + assert((1 << 31i).hash() == (1 << 31i)); + assert(1.0f32.hash() == 1065353216i32); - // double needs a better hash implementation - assert(1.0.hash() == 0i32); + assert(1.0.hash() == 1072693248); }