diff --git a/lib/OrdinaryDiffEqFunctionMap/test/discrete_algorithm_test.jl b/lib/OrdinaryDiffEqFunctionMap/test/discrete_algorithm_test.jl index ce63f45703..99c154f3f5 100644 --- a/lib/OrdinaryDiffEqFunctionMap/test/discrete_algorithm_test.jl +++ b/lib/OrdinaryDiffEqFunctionMap/test/discrete_algorithm_test.jl @@ -63,3 +63,17 @@ end @test sol3.u == [[0, 0], [1, 1], [2, 3], [3, 6], [4, 10], [5, 15]] end + +@testset "FunctionMap keyword validation" begin + current_limiter!(u, integrator, p, t) = nothing + legacy_limiter!(u, integrator, p, t) = nothing + + @test FunctionMap(step_limiter = current_limiter!).step_limiter! === current_limiter! + @test FunctionMap(; step_limiter! = legacy_limiter!).step_limiter! === legacy_limiter! + @test_throws ArgumentError("Unsupported keyword argument(s): (:unsupported,)") FunctionMap( + unsupported = true + ) + @test_throws ArgumentError( + "Unsupported keyword argument(s): (:unsupported, :also_unsupported)" + ) FunctionMap(unsupported = true, also_unsupported = true) +end diff --git a/lib/OrdinaryDiffEqFunctionMap/test/qa/qa.jl b/lib/OrdinaryDiffEqFunctionMap/test/qa/qa.jl index 5ec4e434da..40e68e930b 100644 --- a/lib/OrdinaryDiffEqFunctionMap/test/qa/qa.jl +++ b/lib/OrdinaryDiffEqFunctionMap/test/qa/qa.jl @@ -12,9 +12,14 @@ run_qa( # OrdinaryDiffEqCore owner-internal no-op limiter (deliberately not public). ignore = (:trivial_limiter!,), ), - # SciMLBase-owned default-solve sentinels; non-public in SciMLBase. all_qualified_accesses_are_public = (; - ignore = (:DISCRETE_INPLACE_DEFAULT, :DISCRETE_OUTOFPLACE_DEFAULT), + ignore = ( + # SciMLBase-owned default-solve sentinels; non-public in SciMLBase. + :DISCRETE_INPLACE_DEFAULT, + :DISCRETE_OUTOFPLACE_DEFAULT, + # Preserves the statically known NamedTuple type after field removal. + :structdiff, + ), ), ), )