From 6c824bce5e8feee234a6fd2935cf330f4a23a307 Mon Sep 17 00:00:00 2001 From: hyrodium Date: Mon, 21 Feb 2022 21:11:04 +0900 Subject: [PATCH] update exp tests for norm flag --- test/test_Quaternion.jl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/test_Quaternion.jl b/test/test_Quaternion.jl index 1512295e..8607e7ba 100644 --- a/test/test_Quaternion.jl +++ b/test/test_Quaternion.jl @@ -231,11 +231,11 @@ for _ in 1:100 end @testset "exp" begin - @test exp(Quaternion(0, 0, 0, 0)) == Quaternion(1, 0, 0, 0, true) - @test exp(Quaternion(2, 0, 0, 0)) == Quaternion(exp(2), 0, 0, 0, false) - @test exp(Quaternion(0, 2, 0, 0)) == Quaternion(cos(2), sin(2), 0, 0, true) - @test exp(Quaternion(0, 0, 2, 0)) == Quaternion(cos(2), 0, sin(2), 0, true) - @test exp(Quaternion(0, 0, 0, 2)) == Quaternion(cos(2), 0, 0, sin(2), true) + @test exp(Quaternion(0, 0, 0, 0)) === Quaternion(1., 0., 0., 0., true) + @test exp(Quaternion(2, 0, 0, 0)) === Quaternion(exp(2), 0, 0, 0, false) + @test exp(Quaternion(0, 2, 0, 0)) === Quaternion(cos(2), sin(2), 0, 0, true) + @test exp(Quaternion(0, 0, 2, 0)) === Quaternion(cos(2), 0, sin(2), 0, true) + @test exp(Quaternion(0, 0, 0, 2)) === Quaternion(cos(2), 0, 0, sin(2), true) @test norm(exp(Quaternion(0, 0, 0, 0))) ≈ 1 @test norm(exp(Quaternion(2, 0, 0, 0))) ≠ 1 @@ -243,11 +243,11 @@ end @test norm(exp(Quaternion(0, 0, 2, 0))) ≈ 1 @test norm(exp(Quaternion(0, 0, 0, 2))) ≈ 1 - @test exp(Quaternion(0., 0., 0., 0.)) == Quaternion(1, 0, 0, 0, true) - @test exp(Quaternion(2., 0., 0., 0.)) == Quaternion(exp(2), 0, 0, 0, false) - @test exp(Quaternion(0., 2., 0., 0.)) == Quaternion(cos(2), sin(2), 0, 0, true) - @test exp(Quaternion(0., 0., 2., 0.)) == Quaternion(cos(2), 0, sin(2), 0, true) - @test exp(Quaternion(0., 0., 0., 2.)) == Quaternion(cos(2), 0, 0, sin(2), true) + @test exp(Quaternion(0., 0., 0., 0.)) === Quaternion(1., 0., 0., 0., true) + @test exp(Quaternion(2., 0., 0., 0.)) === Quaternion(exp(2), 0, 0, 0, false) + @test exp(Quaternion(0., 2., 0., 0.)) === Quaternion(cos(2), sin(2), 0, 0, true) + @test exp(Quaternion(0., 0., 2., 0.)) === Quaternion(cos(2), 0, sin(2), 0, true) + @test exp(Quaternion(0., 0., 0., 2.)) === Quaternion(cos(2), 0, 0, sin(2), true) @test norm(exp(Quaternion(0., 0., 0., 0.))) ≈ 1 @test norm(exp(Quaternion(2., 0., 0., 0.))) ≠ 1