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

Include AA's conformance tests in all files that use them #4439

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/AlgebraicGeometry/Schemes/FunctionFields.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
const rng = Oscar.get_seeded_rng()

if !isdefined(Main, :test_Field_interface)
import Oscar.AbstractAlgebra
include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))
end

function test_elem(K::VarietyFunctionField)
F = representative_field(K)
P = base_ring(F)::MPolyRing
Expand Down
9 changes: 5 additions & 4 deletions test/Groups/conformance.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
L = [ alternating_group(5), cyclic_group(18), SL(3,3), free_group(0), free_group(1), free_group(2) ]

import Oscar.AbstractAlgebra
import Oscar.AbstractAlgebra: Group

include(joinpath(dirname(pathof(AbstractAlgebra)), "..", "test", "Groups-conformance-tests.jl"))
if !isdefined(Main, :test_Group_interface)
import Oscar.AbstractAlgebra
import Oscar.AbstractAlgebra: Group
include(joinpath(dirname(pathof(AbstractAlgebra)), "..", "test", "Groups-conformance-tests.jl"))
end

@testset "GAPGroups_interface_conformance $G of type $(typeof(G))" for G in L

Expand Down
10 changes: 2 additions & 8 deletions test/LieTheory/WeylGroup.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import Oscar.AbstractAlgebra
import Oscar.AbstractAlgebra: Group
include(
joinpath(dirname(pathof(AbstractAlgebra)), "..", "test", "Groups-conformance-tests.jl")
)

@testset "LieTheory.WeylGroup" begin
function is_in_normal_form(x::WeylGroupElem)
return word(parent(x)(word(x))) == word(x)
Expand Down Expand Up @@ -348,7 +342,7 @@ include(
@test parent(x) === x.parent
@test parent(x) isa WeylGroup
end

@testset "reflection" begin
for i in 2:4
R = root_system(:A, i)
Expand Down Expand Up @@ -411,7 +405,7 @@ include(
end
end
end

@testset "ReducedExpressionIterator" begin
W = weyl_group(:A, 3)
s = gens(W)
Expand Down
13 changes: 10 additions & 3 deletions test/LieTheory/setup_tests.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
if !isdefined(Main, :test_mutating_op_like_zero)
import Oscar.AbstractAlgebra
include(
joinpath(
pathof(Oscar.Nemo.AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"
),
joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl")
)
end

if !isdefined(Main, :test_Group_interface)
import Oscar.AbstractAlgebra
import Oscar.AbstractAlgebra: Group
include(
joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Groups-conformance-tests.jl")
)
end

Expand Down
10 changes: 5 additions & 5 deletions test/Rings/PBWAlgebraQuo.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
function test_elem(Q::PBWAlgQuo{QQFieldElem})
R = base_ring(Q)
return Q(R(rand(base_ring(R), 1:4, 1:4, 1:4)))
end

@testset "PBWAlgebraQuo.constructor" begin
r, (x, y, z) = QQ[:x, :y, :z]
R, (x, y, z) = pbw_algebra(r, [0 x*y x*z; 0 0 y*z + 1; 0 0 0], deglex(r))
Expand Down Expand Up @@ -25,11 +30,6 @@ end
@test string(one(R)) == "1"
end

function test_elem(Q::PBWAlgQuo{QQFieldElem})
R = base_ring(Q)
return Q(R(rand(base_ring(R), 1:4, 1:4, 1:4)))
end

@testset "PBWAlgebraQuo.conformance" begin
r, (a, h, f, e) = QQ[:a, :h, :f, :e]
rel = @pbw_relations(e*f == f*e-h, e*h == h*e+2*e, f*h == h*f-2*f)
Expand Down
4 changes: 4 additions & 0 deletions test/Rings/setup_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if !isdefined(Main, :test_Field_interface) || !isdefined(Main, :test_NCRing_interface)
import Oscar.AbstractAlgebra
include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))
end
3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ if VERSION >= v"1.8.0"
@everywhere GC.enable_logging(true)
end

@everywhere import Oscar.Nemo.AbstractAlgebra
@everywhere include(joinpath(pathof(Oscar.Nemo.AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))

# hotfix, otherwise StraightLinePrograms returns something which then leads to an error
module SLPTest
end
Expand Down
Loading