Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsipher committed Aug 13, 2024
1 parent 93798d1 commit 942c5c3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -760,12 +760,12 @@ end
@testset "JuMP.show_backend_summary" begin
# test without optimizer
str = "Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: No optimizer attached.\n Transformation built and up-to-date: false\n"
"Solver: none\n Transformation built and up-to-date: false\n"
io_test(show_backend_summary, str, m)
# test with optimizer
set_optimizer(m, mockoptimizer)
str = "Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: Mock\n Transformation built and up-to-date: false\n"
"Solver: Mock\n Transformation built and up-to-date: false\n"
io_test(show_backend_summary, str, m)
# test fallback
str = " Backend type: TestBackend\n"
Expand Down Expand Up @@ -795,14 +795,14 @@ end
"`GenericAffExpr{Float64, GeneralVariableRef}`-in-`MathOptInterface.LessThan{Float64}`: " *
"2 constraints\nNames registered in the model: c1, c3, par1, pars, x, y, z\n" *
"Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: Mock\n Transformation built and up-to-date: false\n"
"Solver: Mock\n Transformation built and up-to-date: false\n"
str2 = "An InfiniteOpt Model\nMinimization problem with:\n Finite parameters: 0\n " *
"Infinite parameters: 3\n Variables: 3\n Derivatives: 0\n Measures: 0\n " *
"Objective function type: GenericAffExpr{Float64,GeneralVariableRef}\n " *
"`GenericAffExpr{Float64,GeneralVariableRef}`-in-`MathOptInterface.LessThan{Float64}`: " *
"2 constraints\nNames registered in the model: c1, c3, par1, pars, x, y, z\n" *
"Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: Mock\n Transformation built and up-to-date: false\n"
"Solver: Mock\n Transformation built and up-to-date: false\n"
show_test(MIME("text/plain"), m, [str, str2], repl=:show)
# test maximization
set_objective_sense(m, MOI.MAX_SENSE)
Expand All @@ -812,14 +812,14 @@ end
"`GenericAffExpr{Float64, GeneralVariableRef}`-in-`MathOptInterface.LessThan{Float64}`: " *
"2 constraints\nNames registered in the model: c1, c3, par1, pars, x, y, z\n" *
"Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: Mock\n Transformation built and up-to-date: false\n"
"Solver: Mock\n Transformation built and up-to-date: false\n"
str2 = "An InfiniteOpt Model\nMaximization problem with:\n Finite parameters: 0\n " *
"Infinite parameters: 3\n Variables: 3\n Derivatives: 0\n Measures: 0\n " *
"Objective function type: GenericAffExpr{Float64,GeneralVariableRef}\n " *
"`GenericAffExpr{Float64,GeneralVariableRef}`-in-`MathOptInterface.LessThan{Float64}`: " *
"2 constraints\nNames registered in the model: c1, c3, par1, pars, x, y, z\n" *
"Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: Mock\n Transformation built and up-to-date: false\n"
"Solver: Mock\n Transformation built and up-to-date: false\n"
show_test(MIME("text/plain"), m, [str, str2], repl=:show)
# test feasibility
set_objective_sense(m, MOI.FEASIBILITY_SENSE)
Expand All @@ -828,13 +828,13 @@ end
"`GenericAffExpr{Float64, GeneralVariableRef}`-in-`MathOptInterface.LessThan{Float64}`: " *
"2 constraints\nNames registered in the model: c1, c3, par1, pars, x, y, z\n" *
"Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: Mock\n Transformation built and up-to-date: false\n"
"Solver: Mock\n Transformation built and up-to-date: false\n"
str2 = "An InfiniteOpt Model\nFeasibility problem with:\n Finite parameters: 0\n " *
"Infinite parameters: 3\n Variables: 3\n Derivatives: 0\n Measures: 0\n " *
"`GenericAffExpr{Float64,GeneralVariableRef}`-in-`MathOptInterface.LessThan{Float64}`: " *
"2 constraints\nNames registered in the model: c1, c3, par1, pars, x, y, z\n" *
"Transformation backend information: \n Backend type: TranscriptionBackend\n " *
"Solver name: Mock\n Transformation built and up-to-date: false\n"
"Solver: Mock\n Transformation built and up-to-date: false\n"
show_test(MIME("text/plain"), m, [str, str2], repl=:show)
end
end

0 comments on commit 942c5c3

Please sign in to comment.