GroupsWithPropertyT/runtests.jl

111 lines
2.2 KiB
Julia

using Base.Test
include("main.jl")
testdir = "tests_"*string(now())
info(testdir)
mkdir(testdir)
cd(testdir)
function SL_tests(args)
G = PropertyTGroups.SpecialLinearGroup(args)
args["p"] = 3
@test main(G) == true
println("\n"*"="^30*"\n")
begin
args["p"] = 5
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
args["warmstart"] = true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
end
println("\n"*"="^30*"\n")
begin
args["p"] = 7
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
println("\n"*"="^30*"\n")
args["upper-bound"] = 0.25
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
end
println("\n"*"="^30*"\n")
args["N"] = 3
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == true
println("\n"*"="^30*"\n")
begin
args["p"] = 0
args["iterations"] = 50000
args["upper-bound"] = Inf
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
args["upper-bound"] = 0.27
args["warmstart"] = true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == true
end
return main(G)
end
@testset "SLn's" begin
@testset "Non-Symmetrized" begin
args = Dict(
"N" => 2,
"p" => 3,
"X" => false,
"iterations"=>50000,
"tol"=>1e-7,
"upper-bound"=>Inf,
"cpus"=>2,
"radius"=>2,
"warmstart"=>false,
"nosymmetry"=>true,
)
SL_tests(args)
end
@testset "Symmetrized" begin
args = Dict(
"N" => 2,
"p" => 3,
"X" => false,
"iterations"=>50000,
"tol"=>1e-7,
"upper-bound"=>Inf,
"cpus"=>2,
"radius"=>2,
"warmstart"=>false,
"nosymmetry"=>false,
)
SL_tests(args)
end
end