Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions lib/OrdinaryDiffEqFunctionMap/test/discrete_algorithm_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 7 additions & 2 deletions lib/OrdinaryDiffEqFunctionMap/test/qa/qa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
),
),
)
Loading