Skip to content

Commit

Permalink
Fix test for 1.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed May 11, 2023
1 parent 3101698 commit d1bce98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/features.jl
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ global_param = 3
y, back = Zygote._pullback(cx, x -> x*global_param, 2)
@test y == 6
@test back(1) == (nothing, 3)
Zygote.cache(cx)[GlobalRef(Main, :global_param)] == 2
ref = first(keys(Zygote.cache(cx)))
@test ref isa GlobalRef
@test ref.mod == Main
@test ref.name == :global_param
@test Zygote.cache(cx)[ref] == 2
end

function pow_try(x)
Expand Down

0 comments on commit d1bce98

Please sign in to comment.