File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2265,6 +2265,13 @@ function test_is_complex()
22652265 return
22662266end
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+
22682275end # module
22692276
22702277TestUtilitiesFunctions. runtests ()
Original file line number Diff line number Diff 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
751752end
752753
Original file line number Diff line number Diff line change @@ -393,6 +393,16 @@ function test_showerror_SetTypeMismatch()
393393 return
394394end
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+
396406end # module
397407
398408TestAttributes. runtests ()
You can’t perform that action at this time.
0 commit comments