Skip to content

Commit 14f6bce

Browse files
committed
Add no allocation test
1 parent d491cfd commit 14f6bce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/integrator_tests.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using SciMLBase
2-
mutable struct DummySolution
3-
retcode::Any
2+
3+
struct DummySolution
4+
retcode::SciMLBase.ReturnCode.T
45
end
56

67
SciMLBase.solution_new_retcode(::DummySolution, code) = DummySolution(code)
@@ -73,3 +74,8 @@ end
7374
@test integrator.sol.retcode == ReturnCode.Default
7475
@test SciMLBase.check_error!(integrator) == ReturnCode.Success
7576
@test integrator.sol.retcode == ReturnCode.Success
77+
78+
let
79+
integrator = DummyIntegrator()
80+
@test 0 == @allocated SciMLBase.check_error!(integrator)
81+
end

0 commit comments

Comments
 (0)