Skip to content

Commit

Permalink
Use === nothing in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ToucheSir authored Oct 25, 2023
1 parent 12bdca9 commit 08e0cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/gradcheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ end

# Ensure that nothings work with numeric types.
_, back = Zygote.pullback(getindex, randn(4), [1])
@test back([nothing]) == nothing
@test back([nothing]) === nothing

# Ensure that nothings work with non-numeric types.
_, back = Zygote.pullback(getindex, [randn(2) for _ in 1:3], [1])
@test back([nothing]) == nothing
@test back([nothing]) === nothing
end

@testset "view" begin
Expand Down

0 comments on commit 08e0cd8

Please sign in to comment.