Skip to content

Commit

Permalink
add more tests for ==
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Nov 25, 2023
1 parent e04266b commit 670aa2a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Quaternion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,18 @@ end
@test Quaternion(1, 2, 3, 4) != 1
@test Quaternion(1, 0, 0, 0) == 1
@test Quaternion(1, 0, 0, 0) != 0
@test 1 != Quaternion(1, 2, 3, 4)
@test 1 == Quaternion(1, 0, 0, 0)
@test 0 != Quaternion(1, 0, 0, 0)

@test Quaternion(1, 0, 0, 0) == Complex(1, 0)
@test Quaternion(1, 0, 0, 0) != Complex(1, 1)
@test Quaternion(1, 0, 0, 0) != Complex(0, 1)
@test Quaternion(0, 1, 0, 0) != Complex(0, 1)
@test Complex(1, 0) == Quaternion(1, 0, 0, 0)
@test Complex(1, 1) != Quaternion(1, 0, 0, 0)
@test Complex(0, 1) != Quaternion(1, 0, 0, 0)
@test Complex(0, 1) != Quaternion(0, 1, 0, 0)
end

@testset "isequal" begin
Expand Down

0 comments on commit 670aa2a

Please sign in to comment.