Skip to content

Commit 766add4

Browse files
authored
update exp tests for norm flag (#66)
1 parent 688e167 commit 766add4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/test_Quaternion.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,23 @@ for _ in 1:100
231231
end
232232

233233
@testset "exp" begin
234-
@test exp(Quaternion(0, 0, 0, 0)) == Quaternion(1, 0, 0, 0, true)
235-
@test exp(Quaternion(2, 0, 0, 0)) == Quaternion(exp(2), 0, 0, 0, false)
236-
@test exp(Quaternion(0, 2, 0, 0)) == Quaternion(cos(2), sin(2), 0, 0, true)
237-
@test exp(Quaternion(0, 0, 2, 0)) == Quaternion(cos(2), 0, sin(2), 0, true)
238-
@test exp(Quaternion(0, 0, 0, 2)) == Quaternion(cos(2), 0, 0, sin(2), true)
234+
@test exp(Quaternion(0, 0, 0, 0)) === Quaternion(1., 0., 0., 0., true)
235+
@test exp(Quaternion(2, 0, 0, 0)) === Quaternion(exp(2), 0, 0, 0, false)
236+
@test exp(Quaternion(0, 2, 0, 0)) === Quaternion(cos(2), sin(2), 0, 0, true)
237+
@test exp(Quaternion(0, 0, 2, 0)) === Quaternion(cos(2), 0, sin(2), 0, true)
238+
@test exp(Quaternion(0, 0, 0, 2)) === Quaternion(cos(2), 0, 0, sin(2), true)
239239

240240
@test norm(exp(Quaternion(0, 0, 0, 0))) 1
241241
@test norm(exp(Quaternion(2, 0, 0, 0))) 1
242242
@test norm(exp(Quaternion(0, 2, 0, 0))) 1
243243
@test norm(exp(Quaternion(0, 0, 2, 0))) 1
244244
@test norm(exp(Quaternion(0, 0, 0, 2))) 1
245245

246-
@test exp(Quaternion(0., 0., 0., 0.)) == Quaternion(1, 0, 0, 0, true)
247-
@test exp(Quaternion(2., 0., 0., 0.)) == Quaternion(exp(2), 0, 0, 0, false)
248-
@test exp(Quaternion(0., 2., 0., 0.)) == Quaternion(cos(2), sin(2), 0, 0, true)
249-
@test exp(Quaternion(0., 0., 2., 0.)) == Quaternion(cos(2), 0, sin(2), 0, true)
250-
@test exp(Quaternion(0., 0., 0., 2.)) == Quaternion(cos(2), 0, 0, sin(2), true)
246+
@test exp(Quaternion(0., 0., 0., 0.)) === Quaternion(1., 0., 0., 0., true)
247+
@test exp(Quaternion(2., 0., 0., 0.)) === Quaternion(exp(2), 0, 0, 0, false)
248+
@test exp(Quaternion(0., 2., 0., 0.)) === Quaternion(cos(2), sin(2), 0, 0, true)
249+
@test exp(Quaternion(0., 0., 2., 0.)) === Quaternion(cos(2), 0, sin(2), 0, true)
250+
@test exp(Quaternion(0., 0., 0., 2.)) === Quaternion(cos(2), 0, 0, sin(2), true)
251251

252252
@test norm(exp(Quaternion(0., 0., 0., 0.))) 1
253253
@test norm(exp(Quaternion(2., 0., 0., 0.))) 1

0 commit comments

Comments
 (0)