Skip to content

Commit

Permalink
add ain identity test and increase power code cov.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Nov 28, 2024
1 parent 11ba125 commit e000605
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/groups/power_group.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function ManifoldsBase.check_size(
return ManifoldsBase.check_size(PoG.manifold, g)
end
function ManifoldsBase.check_size(
::LieGroup{𝔽,Op,M}, ::Identity
::LieGroup{𝔽,Op,M}, ::Identity{Op}
) where {𝔽,Op<:PowerGroupOperation,M<:ManifoldsBase.AbstractPowerManifold}
return nothing
end
Expand Down
20 changes: 19 additions & 1 deletion test/LieGroupsTestSuite.jl/LieGroupsTestSuite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,20 @@ function test_inv(G::LieGroup, g; test_mutating::Bool=true, test_identity::Bool=
end
return nothing
end

"""
test_is_identity(G::LieGroup, g)
Test that the `Identity` returns that `is_identity` is true and that it is a point
"""
function test_identity(G::LieGroup)
@testset "Identity" begin
e = Identity(G)
@test is_point(G, e)
@test is_identity(G, e)
end
return nothing
end
#
#
# --- L
Expand Down Expand Up @@ -830,7 +844,11 @@ function test_lie_group(G::LieGroup, properties::Dict, expectations::Dict=Dict()
end
if (inv in functions)
test_inv(G, points[1]; test_mutating=mutating)
end #
end
if (is_identity in functions)
test_identity(G)
end
#
#
# --- L
if (lie_bracket in functions)
Expand Down

0 comments on commit e000605

Please sign in to comment.