Skip to content

Commit

Permalink
Merge pull request #98 from JuliaReach/mforets/31
Browse files Browse the repository at this point in the history
Add tests for dimension
  • Loading branch information
mforets authored Apr 13, 2020
2 parents 77932c1 + 37195c9 commit b1ee5d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/algorithms/BOX.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
@test isa(sol.alg, BOX)
@test setrep(sol) <: Hyperrectangle
@test setrep(sol) == Hyperrectangle{Float64,Array{Float64,1},Array{Float64,1}}
@test dim(sol) == 1

# higher-dimensional homogeneous
prob, tspan = linear5D_homog()
sol = solve(prob, tspan=tspan, BOX=0.01))
@test setrep(sol) == Hyperrectangle{Float64,Array{Float64,1},Array{Float64,1}}
#@test dim(sol) == 5
@test dim(sol) == 5

# static option
sol = solve(prob, tspan=tspan, BOX=0.01), static=true)
Expand Down
2 changes: 2 additions & 0 deletions test/algorithms/GLGM06.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
@test isa(sol.alg, GLGM06)
@test setrep(sol) <: Zonotope
@test setrep(sol) == Zonotope{Float64,Array{Float64,1},Array{Float64,2}}
@test dim(sol) == 1

# higher-dimensional homogeneous
prob, tspan = linear5D_homog()
sol = solve(prob, tspan=tspan, GLGM06=0.01))
@test dim(sol) == 5

# static option
sol = solve(prob, tspan=tspan, GLGM06=0.01), static=true)
Expand Down
3 changes: 3 additions & 0 deletions test/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
# test that in the border of the time transition we get two reachsets
F = flowpipe(sol)
@test F(0.1) == F[1:2]

# dimension
@test dim(F) == 1
end

@testset "Solution interface: initial states" begin
Expand Down

0 comments on commit b1ee5d2

Please sign in to comment.