mirror of
https://gitlab.com/MisterBiggs/astro-helper.git
synced 2025-08-02 03:11:24 +00:00
init commit
This commit is contained in:
2
test/Project.toml
Normal file
2
test/Project.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[deps]
|
||||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
|
12
test/runtests.jl
Normal file
12
test/runtests.jl
Normal file
@@ -0,0 +1,12 @@
|
||||
using AstroHelper
|
||||
using Test
|
||||
|
||||
import AstroHelper: Quaternion
|
||||
|
||||
@testset "Quaternion Initialization" begin
|
||||
@test Quaternion().r == 1.0
|
||||
@test Quaternion([0,0,0,1]) == Quaternion(0, 0, 0, 1)
|
||||
@test Quaternion([0 0 0], 0) == Quaternion(0, 0, 0, 1)
|
||||
@test Quaternion([1 -2 2], (-2 * pi / 3)) ≈ Quaternion([-sqrt(3) / 6, sqrt(3) / 3, -sqrt(3) / 3, 1 / 2])
|
||||
@test_throws ErrorException Quaternion(1, 2, 3, 4)
|
||||
end
|
Reference in New Issue
Block a user