Skip to content

Commit e24b18d

Browse files
committed
Update
1 parent f4e3d59 commit e24b18d

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

test/Utilities/functions.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,13 @@ function test_is_complex()
22652265
return
22662266
end
22672267

2268+
function test_ndims()
2269+
x = MOI.VariableIndex(1)
2270+
@test ndims(1.0 * x) == 0
2271+
@test ndims(MOI.ScalarAffineFunction{Float64}) == 0
2272+
return
2273+
end
2274+
22682275
end # module
22692276

22702277
TestUtilitiesFunctions.runtests()

test/Utilities/print.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,9 @@ function test_print_model_to_stdout()
745745
@test Base.Multimedia.displayable(d, "text/latex")
746746
print(model; _latex_display = d)
747747
seekstart(io)
748+
prefix = VERSION < v"1.7" ? "" : "\n"
748749
@test read(io, String) ==
749-
"\$\$ \\begin{aligned}\n\\text{feasibility}\\\\\n\\text{Subject to}\\\\\n\\end{aligned} \$\$\n"
750+
"\$\$ \\begin{aligned}\n\\text{feasibility}\\\\\n\\text{Subject to}\\\\\n\\end{aligned} \$\$$(prefix)"
750751
return
751752
end
752753

test/attributes.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,16 @@ function test_showerror_SetTypeMismatch()
393393
return
394394
end
395395

396+
function test_NLPBlockDual_is_set_by_optimize()
397+
@test MOI.is_set_by_optimize(MOI.NLPBlockDual())
398+
return
399+
end
400+
401+
function test_CallbackVariablePrimal_is_set_by_optimize()
402+
@test MOI.is_set_by_optimize(MOI.CallbackVariablePrimal(nothing))
403+
return
404+
end
405+
396406
end # module
397407

398408
TestAttributes.runtests()

0 commit comments

Comments
 (0)