Skip to content

Commit

Permalink
Merge pull request #3653 from JuliaReach/schillic/hcat
Browse files Browse the repository at this point in the history
Use hcat in tests
  • Loading branch information
schillic authored Nov 20, 2024
2 parents f0a4634 + b5f9328 commit d7ecbfb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
- name: Run tests
uses: julia-actions/julia-runtest@v1
timeout-minutes: 30 # kill stale process earlier
continue-on-error: ${{ matrix.version == '1.6' }}
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage
Expand Down
4 changes: 2 additions & 2 deletions test/ConcreteOperations/isequivalent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ for N in [Float64, Float32, Rational{Int}]
Z = Zonotope(N[1, 2], Matrix{N}(undef, 2, 0))
@test isequivalent(S, Z) && isequivalent(Z, S)
# zero generators
Z = Zonotope(N[1, 2], N[0; 0;;])
Z = Zonotope(N[1, 2], hcat(N[0, 0]))
@test isequivalent(S, Z) && isequivalent(Z, S)
# wrong center
Z = Zonotope(N[2, 1], Matrix{N}(undef, 2, 0))
@test !isequivalent(S, Z) && !isequivalent(Z, S)
# nonzero generators
Z = Zonotope(N[1, 2], N[1; 0;;])
Z = Zonotope(N[1, 2], hcat(N[1, 0]))
@test !isequivalent(S, Z) && !isequivalent(Z, S)
end
2 changes: 1 addition & 1 deletion test/Sets/Interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ for N in [Float64, Float32, Rational{Int}]
M = hcat(N[2])
v = N[-3]
@test affine_map(M, I1, v) == Interval(N(-3), N(-1))
M2 = N[2; -2;;]
M2 = hcat(N[2, -2])
v = N[-1, -1]
H = affine_map(M2, I1, v)
@test H isa Zonotope && isequivalent(H, LineSegment(N[-1, -1], N[1, -3]))
Expand Down
3 changes: 2 additions & 1 deletion test/Sets/SparsePolynomialZonotope.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ for N in [Float64, Float32, Rational{Int}]
@test expmat(PZreduced) == [1 2; 0 1]
# also removes almost-zero columns
if N <: AbstractFloat
PZ = SparsePolynomialZonotope(N[-1, 2], N[1e-16; -1e-16;;], N[1e-16; -1e-16;;], [1; 1;;])
PZ = SparsePolynomialZonotope(N[-1, 2], hcat(N[1e-16, -1e-16]),
hcat(N[1e-16, -1e-16]), hcat([1, 1]))
PZreduced = remove_redundant_generators(PZ)
@test center(PZreduced) == N[-1, 2]
@test size(genmat_dep(PZreduced)) == (2, 0)
Expand Down

0 comments on commit d7ecbfb

Please sign in to comment.