Skip to content

Commit a4917c3

Browse files
authored
Merge pull request #742 from control-toolbox/auto-juliaformatter-pr
[AUTO] JuliaFormatter.jl run
2 parents 42e3164 + f477f39 commit a4917c3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

test/helpers/print_utils.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ function print_test_line(
311311
# Relative error: display as scientific notation (convert % to fraction)
312312
@sprintf("%.2e", error_value / 100)
313313
end
314-
314+
315315
# Color thresholds based on provided tolerances
316316
err_color = if error_value === missing
317317
:white
@@ -321,7 +321,13 @@ function print_test_line(
321321
else
322322
# Relative error (in %): green if < rtol*100, yellow if < 5*rtol*100, red otherwise
323323
rtol_percent = rtol * 100
324-
(error_value < rtol_percent ? :green : (error_value < 5 * rtol_percent ? :yellow : :red))
324+
(
325+
if error_value < rtol_percent
326+
:green
327+
else
328+
(error_value < 5 * rtol_percent ? :yellow : :red)
329+
end
330+
)
325331
end
326332
printstyled(lpad(err_str, 7); color=err_color)
327333

test/suite/reexport/test_ctflows.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ function test_ctflows()
333333
Test.@test X1([1, 2]) isa Vector
334334

335335
# Non-autonomous
336-
X2 = OptimalControl.VectorField((t, x) -> [t + x[2], -x[1]]; autonomous=false)
336+
X2 = OptimalControl.VectorField(
337+
(t, x) -> [t + x[2], -x[1]]; autonomous=false
338+
)
337339
Test.@test X2 isa OptimalControl.VectorField
338340
Test.@test X2(1.0, [1, 2]) isa Vector
339341

0 commit comments

Comments
 (0)