Skip to content

Commit 51d05ed

Browse files
committed
Add a test for Unitful allocations
1 parent b646750 commit 51d05ed

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/methods.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ struct NotAFunction end # not <: Function on purpose, cf #224
8282
@testset "Test allocations" begin
8383
m = central_fdm(5, 2, adapt=2)
8484
@test @ballocated($m(sin, 1)) == 0
85+
fn(t) = sin(t / u"s")
86+
@test @ballocated($m($fn, 1u"s")) == 0
8587
end
8688

8789
# Integration test to ensure that Integer-output functions can be tested.

0 commit comments

Comments
 (0)