Skip to content

Commit ddecd4e

Browse files
Miha Zgubicoxinabox
authored andcommitted
test for thunks
1 parent 492364c commit ddecd4e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ChainRulesTestUtils.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ using LinearAlgebra
99
using Random
1010
using Test
1111

12+
const _fdm = central_fdm(5, 1; max_range=1e-2)
13+
const TEST_INFERRED = Ref(true)
14+
const TRANSFORMS_TO_ALT_TANGENTS = Function[x -> @thunk(x)] # e.g. [x -> @thunk(x), _ -> ZeroTangent(), x -> rebasis(x)]
15+
1216
export TestIterator
1317
export test_approx, test_scalar, test_frule, test_rrule, generate_well_conditioned_matrix
1418
export , rand_tangent

0 commit comments

Comments
 (0)