From 2f9ba8864fa9da9371fe88343babe23b11e81573 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Tue, 12 Dec 2017 20:16:15 -0300 Subject: [PATCH] Execute 128bits Hasher specs that are now passing It seems i128 and u128 `hash` specs were left out as pending. This change runs them as latest Crystal is cable to compute equal hashes. Conditionally run this on 64bits platforms. Ref #5276 --- spec/std/crystal/hasher_spec.cr | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spec/std/crystal/hasher_spec.cr b/spec/std/crystal/hasher_spec.cr index fb4b5e568e7a..9a1ebac9e9f9 100644 --- a/spec/std/crystal/hasher_spec.cr +++ b/spec/std/crystal/hasher_spec.cr @@ -56,10 +56,13 @@ describe "Crystal::Hasher" do Int64::MAX.hash.should eq(Int64::MAX.hash) end - pending "128bit types should be hashed ok" do - 1.to_i128.hash.should eq(1_i8.hash) - 1.to_u128.hash.should eq(1_u8.hash) - end + # TODO: remove fencing when 128bits support is added to non-native platforms + {% if flag?(:bits64) %} + it "128bit types should be hashed ok" do + 1.to_i128.hash.should eq(1_i8.hash) + 1.to_u128.hash.should eq(1_u8.hash) + end + {% end %} it "#float should change state and differ" do hasher = TestHasher.for_test