Skip to content

Commit

Permalink
replace == with === in hash test
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Feb 3, 2024
1 parent 859d0f5 commit eab2f56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/Quaternion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ end

@testset "hash" begin
# https://github.com/JuliaGeometry/Quaternions.jl/issues/135
@test hash(0) == hash(quat(0)) == hash(0.0) == hash(quat(0.0))
@test hash(1) == hash(quat(1)) == hash(1.0) == hash(quat(1.0))
@test hash(0) === hash(quat(0)) === hash(0.0) === hash(quat(0.0))
@test hash(1) === hash(quat(1)) === hash(1.0) === hash(quat(1.0))
@test hash(quat(-0.0)) hash(quat(+0.0))
@test allunique([hash(quat(1,0,0,0)), hash(quat(0,1,0,0)), hash(quat(0,0,1,0)), hash(quat(0,0,0,1))])
@test hash(57, UInt(42)) == hash(quat(57), UInt(42))
@test hash(57, UInt(42)) === hash(quat(57), UInt(42))
@test length(unique(Quaternion[quat(2), quat(big"2")])) == 1
end

Expand Down

0 comments on commit eab2f56

Please sign in to comment.