Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage for CartanMatrix.jl #4295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felix-roehrich
Copy link
Collaborator

Increase test coverage of CartanMatrix.jl to prepare for #4263.

@lgoettgens lgoettgens added topic: LieAlgebras experimental Only changes experimental parts of the code labels Nov 9, 2024
if i != 2
@test_throws ArgumentError cartan_matrix(:G, i)
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you transform this block of tests into tests for is_cartan_type and then test the cartan matrix constructor via

for i in -1:10, fam in (:A, :B, :C, :D, :E, :F, :G)
  if is_cartan_type(fam, i)
    cartan_matrix(fam, i)
  else
    @test_throws ArgumentError cartan_matrix(fam, i)
  end
end

?

@test cartan_symmetrizer(cartan_matrix((:C, 4), (:G, 2))) == [[1, 1, 1, 2]; [1, 3]]

@test cartan_symmetrizer(ZZ[2 -2 0; -1 2 -1; 0 -1 2]) == [1, 2, 2]
@test cartan_symmetrizer(ZZ[2 0 -1 0; 0 2 0 -2; -2 0 2 0; 0 -1 0 2]) == [2, 1, 1, 2]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are still indirectly tested via the bilinear form test below, right?

end

bil = cartan_bilinear_form(cm)
@test is_symmetric(bil) == true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@test is_symmetric(bil) == true
@test is_symmetric(bil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Only changes experimental parts of the code topic: LieAlgebras
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants