Skip to content

Commit 0c05618

Browse files
Update finitedifftests.jl for non-allocating
1 parent c49cdd2 commit 0c05618

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/finitedifftests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,15 @@ end
334334
res = zero(x)
335335
FiniteDiff.finite_difference_gradient!(res, _f, x, cache)
336336
@test res _∇f(x)
337-
@test_broken ret_allocs(res, _f, x, cache) == 0
337+
@test ret_allocs(res, _f, x, cache) == 0
338338

339339
# Can we now change the field?
340340
_x = rand(2)
341341
_cache = deepcopy(cache)
342342
_cache = @set _cache.fx = _f(_x)
343343
FiniteDiff.finite_difference_gradient!(res, _f,_x, _cache)
344344
@test res _∇f(_x)
345-
@test_broken ret_allocs(res, _f, _x, _cache) == 0
345+
@test ret_allocs(res, _f, _x, _cache) == 0
346346
end
347347

348348
_g(x) = x[1]^2 + x[2]

0 commit comments

Comments
 (0)