diff --git a/Project.toml b/Project.toml index 48d9345..ab484df 100644 --- a/Project.toml +++ b/Project.toml @@ -16,6 +16,7 @@ CliffordNumbersUnitfulExt = "Unitful" [compat] Aqua = "0.8" LinearAlgebra = "1" +StaticArrays = "1" StaticArraysCore = "1" Test = "1" Unitful = "1" @@ -23,8 +24,10 @@ julia = "1.9" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [targets] -test = ["Aqua", "Test", "Unitful"] +test = ["Aqua", "LinearAlgebra", "StaticArrays", "Test", "Unitful"] diff --git a/test/ext/LinearAlgebra.jl b/test/ext/LinearAlgebra.jl new file mode 100644 index 0000000..87d17ea --- /dev/null +++ b/test/ext/LinearAlgebra.jl @@ -0,0 +1,6 @@ +@testset "LinearAlgebra extensions" begin + k = KVector{1,VGA(3)}(4, 2, 0) + l = KVector{2,VGA(3)}(0, 6, 9) + @test CliffordNumbers.dot(k, l) === LinearAlgebra.dot(k, l) + @test CliffordNumbers.normalize(k) === LinearAlgebra.normalize(k) +end diff --git a/test/ext/StaticArraysCore.jl b/test/ext/StaticArraysCore.jl new file mode 100644 index 0000000..3a72200 --- /dev/null +++ b/test/ext/StaticArraysCore.jl @@ -0,0 +1,4 @@ +@testset "StaticArraysCore extension" begin + k = KVector{1,VGA(3)}(4, 2, 0) + @test CliffordNumbers.similar_type(k, Float32) === StaticArrays.similar_type(k, Float32) +end diff --git a/test/runtests.jl b/test/runtests.jl index ea8f88b..1d0b014 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,6 @@ using CliffordNumbers -using Aqua, Test, Unitful +using Aqua, Test +using LinearAlgebra, StaticArrays, Unitful Aqua.test_all(CliffordNumbers; unbound_args = false) @@ -15,7 +16,7 @@ Aqua.test_all(CliffordNumbers; unbound_args = false) include("indexing.jl") include("conversion.jl") include("operations.jl") - if VERSION >= v"1.9.0" - include("ext/Unitful.jl") - end + include("ext/LinearAlgebra.jl") + include("ext/StaticArraysCore.jl") + include("ext/Unitful.jl") end