@@ -363,11 +363,11 @@ function test_compute_sparse_sqrt_edge_cases()
363363 [1.0 0.0 ; 0.0 2.0 ],
364364 # Cholesky works, with pivoting
365365 [1.0 0.0 1.0 ; 0.0 1.0 1.0 ; 1.0 1.0 3.0 ],
366- # Cholesky fails due to 0 eigen value
366+ # Cholesky fails due to 0 eigen value. LDL works
367367 [1.0 1.0 ; 1.0 1.0 ],
368368 # Cholesky succeeds, even though 0 eigen value
369369 [2.0 2.0 ; 2.0 2.0 ],
370- # Cholesky fails because of 0 column/row
370+ # Cholesky fails because of 0 column/row. LDL works
371371 [2.0 0.0 ; 0.0 0.0 ],
372372 ]
373373 B = SparseArrays. sparse (A)
@@ -378,12 +378,18 @@ function test_compute_sparse_sqrt_edge_cases()
378378 end
379379 @test isapprox (A, U' * U; atol = 1e-10 )
380380 end
381- A = [- 1.0 0.0 ; 0.0 1.0 ]
382- B = SparseArrays. sparse (A)
383- @test_throws (
384- MOI. UnsupportedConstraint{typeof (f),typeof (s)},
385- MOI. Bridges. Constraint. compute_sparse_sqrt (B, f, s),
386- )
381+ # Test failures
382+ for A in [
383+ [- 1.0 0.0 ; 0.0 1.0 ],
384+ # Found from test_quadratic_nonconvex_constraint_basic
385+ [0.0 - 1.0 ; - 1.0 0.0 ],
386+ ]
387+ B = SparseArrays. sparse (A)
388+ @test_throws (
389+ MOI. UnsupportedConstraint{typeof (f),typeof (s)},
390+ MOI. Bridges. Constraint. compute_sparse_sqrt (B, f, s),
391+ )
392+ end
387393 return
388394end
389395
0 commit comments