Skip to content

Commit 301ba0e

Browse files
committed
Fix
1 parent fbc498c commit 301ba0e

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

test/conic_form.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
# Use of this source code is governed by an MIT-style license that can be found
44
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
55

6-
function _test_matrix_equal(A::MOI.Utilities.MutableSparseMatrixCSC, B::SparseMatrixCSC)
6+
function _test_matrix_equal(
7+
A::MOI.Utilities.MutableSparseMatrixCSC,
8+
B::SparseMatrixCSC,
9+
I,
10+
)
711
@test A.m == B.m
812
@test A.n == B.n
913
@test A.nzval B.nzval atol = ATOL rtol = RTOL
10-
@test A.rowval == B.rowval
11-
@test A.colptr == B.colptr
14+
shift = I isa MOI.Utilities.OneBasedIndexing ? 0 : 1
15+
@test A.rowval .+ shift == B.rowval
16+
@test A.colptr .+ shift == B.colptr
1217
end
1318

1419
# _psd1test: https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Test/contconic.jl#L2417

0 commit comments

Comments
 (0)