@@ -28,6 +28,8 @@ const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING :
2828struct MockOCP <: CTModels.AbstractModel end
2929struct MockInit <: CTModels.AbstractInitialGuess end
3030struct MockSolution <: CTModels.AbstractSolution end
31+ CTModels. build_initial_guess (:: MockOCP , :: Nothing ) = MockInit ()
32+ CTModels. build_initial_guess (:: MockOCP , i:: MockInit ) = i
3133
3234struct MockDiscretizer <: CTDirect.AbstractDiscretizer
3335 options:: CTSolvers.StrategyOptions
@@ -132,6 +134,20 @@ function test_orchestration()
132134 Test. @test result isa MockSolution
133135 end
134136
137+ Test. @testset " solve_descriptive - alias 'init'" begin
138+ ocp = MockOCP ()
139+ result = CommonSolve. solve (ocp, :collocation , :adnlp , :ipopt ;
140+ init= MockInit (), display= false )
141+ Test. @test result isa MockSolution
142+ end
143+
144+ Test. @testset " solve_descriptive - alias 'i'" begin
145+ ocp = MockOCP ()
146+ result = CommonSolve. solve (ocp, :collocation , :adnlp , :ipopt ;
147+ i= MockInit (), display= false )
148+ Test. @test result isa MockSolution
149+ end
150+
135151 Test. @testset " solve_descriptive - error on unknown option" begin
136152 ocp = MockOCP ()
137153 Test. @test_throws CTBase. IncorrectArgument begin
@@ -145,13 +161,12 @@ function test_orchestration()
145161 # UNIT TESTS - initial_guess normalization (mocks, no real solver)
146162 # ====================================================================
147163
148- Test. @testset " initial_guess=nothing uses MockInit fallback " begin
164+ Test. @testset " initial_guess=nothing → default MockInit " begin
149165 ocp = MockOCP ()
150166 disc = MockDiscretizer (CTSolvers. StrategyOptions ())
151167 mod = MockModeler (CTSolvers. StrategyOptions ())
152168 sol = MockSolver (CTSolvers. StrategyOptions ())
153169 result = CommonSolve. solve (ocp;
154- initial_guess= MockInit (),
155170 discretizer= disc, modeler= mod, solver= sol,
156171 display= false
157172 )
0 commit comments