We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbc498c commit 301ba0eCopy full SHA for 301ba0e
1 file changed
test/conic_form.jl
@@ -3,12 +3,17 @@
3
# Use of this source code is governed by an MIT-style license that can be found
4
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
5
6
-function _test_matrix_equal(A::MOI.Utilities.MutableSparseMatrixCSC, B::SparseMatrixCSC)
+function _test_matrix_equal(
7
+ A::MOI.Utilities.MutableSparseMatrixCSC,
8
+ B::SparseMatrixCSC,
9
+ I,
10
+)
11
@test A.m == B.m
12
@test A.n == B.n
13
@test A.nzval ≈ B.nzval atol = ATOL rtol = RTOL
- @test A.rowval == B.rowval
- @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
17
end
18
19
# _psd1test: https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Test/contconic.jl#L2417
0 commit comments