11module TestGridExtension
22
3- import Test
3+ using Test : Test
44import CTBase. Exceptions
55import CTModels. OCP
66
@@ -61,7 +61,9 @@ function test_grid_extension()
6161 T_path = nothing
6262
6363 # Apply extension logic (mimicking build_solution internal logic)
64- non_nothing_grids = filter (g -> ! isnothing (g), [T_state, T_control, T_costate, T_path])
64+ non_nothing_grids = filter (
65+ g -> ! isnothing (g), [T_state, T_control, T_costate, T_path]
66+ )
6567 T_ref = non_nothing_grids[argmax (map (length, non_nothing_grids))]
6668 T_control_extended = OCP. _extend_grid_to_match (T_control, T_ref, " control" )
6769 T_costate_extended = OCP. _extend_grid_to_match (T_costate, T_ref, " costate" )
@@ -72,11 +74,15 @@ function test_grid_extension()
7274 Test. @test T_state == T_ref
7375
7476 # This would enable UnifiedTimeGridModel in build_solution
75- non_nothing_grids_extended = filter (g -> ! isnothing (g), [T_state, T_control_extended, T_costate_extended, T_path])
76- all_identical = all (g -> g == first (non_nothing_grids_extended), non_nothing_grids_extended)
77+ non_nothing_grids_extended = filter (
78+ g -> ! isnothing (g),
79+ [T_state, T_control_extended, T_costate_extended, T_path],
80+ )
81+ all_identical = all (
82+ g -> g == first (non_nothing_grids_extended), non_nothing_grids_extended
83+ )
7784 Test. @test all_identical
7885 end
79-
8086 end
8187end
8288
0 commit comments