GroupsWithPropertyT/runtests.jl

111 lines
2.2 KiB
Julia
Raw Normal View History

2018-08-18 23:25:20 +02:00
using Base.Test
include("main.jl")
testdir = "tests_"*string(now())
info(testdir)
mkdir(testdir)
cd(testdir)
function SL_tests(args)
2018-08-18 23:25:20 +02:00
G = PropertyTGroups.SpecialLinearGroup(args)
args["p"] = 3
@test main(G) == true
2018-08-18 23:25:20 +02:00
println("\n"*"="^30*"\n")
begin
args["p"] = 5
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
2018-08-18 23:25:20 +02:00
args["warmstart"] = true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
2018-08-18 23:25:20 +02:00
end
println("\n"*"="^30*"\n")
begin
args["p"] = 7
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
2018-08-18 23:25:20 +02:00
println("\n"*"="^30*"\n")
args["upper-bound"] = 0.25
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
2018-08-18 23:25:20 +02:00
end
println("\n"*"="^30*"\n")
args["N"] = 3
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == true
2018-08-18 23:25:20 +02:00
println("\n"*"="^30*"\n")
begin
args["p"] = 0
args["iterations"] = 50000
args["upper-bound"] = Inf
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
2018-08-18 23:25:20 +02:00
args["upper-bound"] = 0.27
args["warmstart"] = true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == false
2018-08-18 23:25:20 +02:00
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == true
2018-08-18 23:25:20 +02:00
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(G) == true
2018-08-18 23:25:20 +02:00
end
return main(G)
2018-08-18 23:25:20 +02:00
end
@testset "SLn's" begin
2018-08-18 23:25:20 +02:00
@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)
2018-08-18 23:25:20 +02:00
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)
2018-08-18 23:25:20 +02:00
end
end