Skip to content

Commit

Permalink
fix 32 bit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Jul 26, 2023
1 parent 1f2b5e0 commit a87b164
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/hashing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@ struct AUnionParam{T<:Union{Nothing,Float32,Float64}} end
# test hashing of rationals that equal floats are equal to the float hash
@test hash(5//2) == hash(big(5)//2) == hash(2.5)
# test hashing of rational that are integers hash to the integer
@test hash(5^25) == hash(big(5)^25) == hash(5^25//1) == hash(big(5)^25//1)
@test hash(Int64(5)^25) == hash(big(5)^25) == hash(Int64(5)^25//1) == hash(big(5)^25//1)
# test integer/rational that don't fit in Float64 don't hash as Float64
@test hash(5^25) != hash(5.0^25)
@test hash((5//2)^25) == hash(big(5//2)^25)
@test hash(Int64(5)^25) != hash(5.0^25)
@test hash((Int64(5)//2)^25) == hash(big(5//2)^25)
# test integer/rational that don't fit in Float64 don't hash as Float64
@test hash((5//2)^25) != hash(2.5^25)
@test hash((Int64(5)//2)^25) != hash(2.5^25)
# test hashing of rational with odd denominator
@test hash(5//3) == hash(big(5)//3)
end

0 comments on commit a87b164

Please sign in to comment.