Skip to content

Commit

Permalink
Added tests for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed Nov 7, 2024
1 parent 0963c2d commit 74386a0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ CliffordNumbersUnitfulExt = "Unitful"
[compat]
Aqua = "0.8"
LinearAlgebra = "1"
StaticArrays = "1"
StaticArraysCore = "1"
Test = "1"
Unitful = "1"
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"]
6 changes: 6 additions & 0 deletions test/ext/LinearAlgebra.jl
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions test/ext/StaticArraysCore.jl
Original file line number Diff line number Diff line change
@@ -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
9 changes: 5 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CliffordNumbers
using Aqua, Test, Unitful
using Aqua, Test
using LinearAlgebra, StaticArrays, Unitful

Aqua.test_all(CliffordNumbers; unbound_args = false)

Expand All @@ -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

0 comments on commit 74386a0

Please sign in to comment.