diff --git a/src/Core/palette.jl b/src/Core/palette.jl index 10f97fe9..75dd3666 100644 --- a/src/Core/palette.jl +++ b/src/Core/palette.jl @@ -359,11 +359,11 @@ function show_palette(io::IO=IOContext(stdout, :color => true)) println(io) println(io, fmt.bold, "Mock describe / show", rst) println(io) - n = open(p.name); + n = open(p.name) t = open(p.type) - v = open(p.value); + v = open(p.value) kw = open(p.keyword) - c = open(p.count); + c = open(p.count) lb = open(p.label) mu = open(p.muted) println(io, " $(n)MyStrategy$(rst) (instance, id=$(kw):gradient$(rst))") @@ -391,9 +391,9 @@ function show_palette(io::IO=IOContext(stdout, :color => true)) println(io) println(io, fmt.bold, "Mock exception", rst) println(io) - er = open(p.error); + er = open(p.error) em = open(p.emphasis) - wa = open(p.warning); + wa = open(p.warning) su = open(p.success) println( io, diff --git a/test/suite/core/test_function_utils.jl b/test/suite/core/test_function_utils.jl index 84a9ae99..40fa5e3e 100644 --- a/test/suite/core/test_function_utils.jl +++ b/test/suite/core/test_function_utils.jl @@ -60,8 +60,7 @@ function test_function_utils() Test.@testset "to_out_of_place - larger output" begin big!(r, x) = ( for i in 1:5 - ; - r[i] = x * i; + r[i] = x * i end ) big = Core.to_out_of_place(big!, 5) diff --git a/test/suite/data/test_hamiltonian_vector_field.jl b/test/suite/data/test_hamiltonian_vector_field.jl index bd2bcbe6..ea26a74e 100644 --- a/test/suite/data/test_hamiltonian_vector_field.jl +++ b/test/suite/data/test_hamiltonian_vector_field.jl @@ -445,8 +445,8 @@ function test_hamiltonian_vector_field() Test.@testset "OOP NonFixed: variable_costate=true on user-built HVF throws PreconditionError" begin f = (x, p, v) -> (p, -x) # no variable_costate kwarg hvf = Data.HamiltonianVectorField(f; is_autonomous=true, is_variable=true) - x = [1.0]; - p = [0.5]; + x = [1.0] + p = [0.5] v = [0.1] Test.@test_throws Exception hvf(x, p, v; variable_costate=true) end @@ -456,10 +456,10 @@ function test_hamiltonian_vector_field() hvf = Data.HamiltonianVectorField( f; is_autonomous=true, is_variable=true, is_inplace=true ) - x = [1.0]; - p = [0.5]; + x = [1.0] + p = [0.5] v = [0.1] - dx = similar(x); + dx = similar(x) dp = similar(p) Test.@test_throws Exception hvf(dx, dp, x, p, v; variable_costate=true) end @@ -467,9 +467,9 @@ function test_hamiltonian_vector_field() Test.@testset "OOP NonAutonomous NonFixed: variable_costate=true on user-built HVF throws PreconditionError" begin f = (t, x, p, v) -> (p, -x) # no variable_costate kwarg hvf = Data.HamiltonianVectorField(f; is_autonomous=false, is_variable=true) - t = 0.5; - x = [1.0]; - p = [0.5]; + t = 0.5 + x = [1.0] + p = [0.5] v = [0.1] Test.@test_throws Exception hvf(t, x, p, v; variable_costate=true) end @@ -479,11 +479,11 @@ function test_hamiltonian_vector_field() hvf = Data.HamiltonianVectorField( f; is_autonomous=false, is_variable=true, is_inplace=true ) - t = 0.5; - x = [1.0]; - p = [0.5]; + t = 0.5 + x = [1.0] + p = [0.5] v = [0.1] - dx = similar(x); + dx = similar(x) dp = similar(p) Test.@test_throws Exception hvf(dx, dp, t, x, p, v; variable_costate=true) end @@ -491,8 +491,8 @@ function test_hamiltonian_vector_field() Test.@testset "OOP NonFixed: variable_costate=false (default) on user-built HVF works" begin f = (x, p, v) -> (p, -x) hvf = Data.HamiltonianVectorField(f; is_autonomous=true, is_variable=true) - x = [1.0]; - p = [0.5]; + x = [1.0] + p = [0.5] v = [0.1] result = hvf(x, p, v) Test.@test result == (p, -x) diff --git a/test/suite/data/test_pseudo_hamiltonian_vector_field.jl b/test/suite/data/test_pseudo_hamiltonian_vector_field.jl index f282952e..ffc933e9 100644 --- a/test/suite/data/test_pseudo_hamiltonian_vector_field.jl +++ b/test/suite/data/test_pseudo_hamiltonian_vector_field.jl @@ -467,9 +467,9 @@ function test_pseudo_hamiltonian_vector_field() phvf = Data.PseudoHamiltonianVectorField( f; is_autonomous=true, is_variable=true ) - x = [1.0]; - p = [0.5]; - u = [0.2]; + x = [1.0] + p = [0.5] + u = [0.2] v = [0.1] Test.@test_throws Exception phvf(x, p, u, v; variable_costate=true) end @@ -479,11 +479,11 @@ function test_pseudo_hamiltonian_vector_field() phvf = Data.PseudoHamiltonianVectorField( f; is_autonomous=true, is_variable=true, is_inplace=true ) - x = [1.0]; - p = [0.5]; - u = [0.2]; + x = [1.0] + p = [0.5] + u = [0.2] v = [0.1] - dx = similar(x); + dx = similar(x) dp = similar(p) Test.@test_throws Exception phvf(dx, dp, x, p, u, v; variable_costate=true) end @@ -493,10 +493,10 @@ function test_pseudo_hamiltonian_vector_field() phvf = Data.PseudoHamiltonianVectorField( f; is_autonomous=false, is_variable=true ) - t = 0.5; - x = [1.0]; - p = [0.5]; - u = [0.2]; + t = 0.5 + x = [1.0] + p = [0.5] + u = [0.2] v = [0.1] Test.@test_throws Exception phvf(t, x, p, u, v; variable_costate=true) end @@ -506,12 +506,12 @@ function test_pseudo_hamiltonian_vector_field() phvf = Data.PseudoHamiltonianVectorField( f; is_autonomous=false, is_variable=true, is_inplace=true ) - t = 0.5; - x = [1.0]; - p = [0.5]; - u = [0.2]; + t = 0.5 + x = [1.0] + p = [0.5] + u = [0.2] v = [0.1] - dx = similar(x); + dx = similar(x) dp = similar(p) Test.@test_throws Exception phvf( dx, dp, t, x, p, u, v; variable_costate=true @@ -523,9 +523,9 @@ function test_pseudo_hamiltonian_vector_field() phvf = Data.PseudoHamiltonianVectorField( f; is_autonomous=true, is_variable=true ) - x = [1.0]; - p = [0.5]; - u = [0.2]; + x = [1.0] + p = [0.5] + u = [0.2] v = [0.1] result = phvf(x, p, u, v) Test.@test result == (p, -x) diff --git a/test/suite/differentiation/test_arg_placement.jl b/test/suite/differentiation/test_arg_placement.jl index 785fb762..d5ed5d46 100644 --- a/test/suite/differentiation/test_arg_placement.jl +++ b/test/suite/differentiation/test_arg_placement.jl @@ -90,9 +90,9 @@ function test_arg_placement() b = _default_backend() # H(t, x, p, v) = t*v + ½‖p‖² + ‖x‖² H(t, x, p, v) = t * v + 0.5 * sum(p .^ 2) + sum(x .^ 2) - t = 1.0; - x = [1.0, 2.0]; - p = [3.0, 4.0]; + t = 1.0 + x = [1.0, 2.0] + p = [3.0, 4.0] v = 5.0 # ∂H/∂x = 2x (slot 2), consts in order t,p,v gx = Differentiation.differentiate(b, H, Val(2), x, t, p, v)