Skip to content

Commit 34e25b2

Browse files
committed
Update
1 parent 64e3762 commit 34e25b2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/General/errors.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,18 @@ function test_logs_precompile()
410410
return
411411
end
412412

413+
function test_GetAttributeNotAllowed_showerror()
414+
c_set = sprint(showerror, MOI.GetAttributeNotAllowed(MOI.ConstraintSet()))
415+
@test occursin("## Fixing this error", c_set)
416+
@test occursin("MOI.Utilities.CachingOptimizer", c_set)
417+
@test !occursin("Check the solver log for details.", c_set)
418+
c_dual = sprint(showerror, MOI.GetAttributeNotAllowed(MOI.ConstraintDual()))
419+
@test occursin("## Fixing this error", c_set)
420+
@test !occursin("MOI.Utilities.CachingOptimizer", c_set)
421+
@test occursin("Check the solver log for details.", c_set)
422+
return
423+
end
424+
413425
end # module
414426

415427
TestErrors.runtests()

0 commit comments

Comments
 (0)