Skip to content

Commit

Permalink
remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Oct 20, 2024
1 parent b731a82 commit 70f6025
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -567,30 +567,6 @@ end
@test length(Flux.params(oneadj)) == 1 # needs Functors@0.3

@test Flux.destructure(simple)[1] == Flux.destructure(oneadj)[1] == [1, 3, 2, 4]

@testset "issue 2432" begin
x = rand(1)
m = (; a = x, b = x')
count = Ref(0)
mcopy = fmap(m; exclude = Flux._isleaf) do x
count[] += 1
return copy(x)
end
@test count[] == 1
@test mcopy.a === mcopy.b'

struct BitsType
x::Int32
y::Float64
end

for x in [1.0, 'a', BitsType(1, 2.0)]
@test Flux._isleaf([x])
@test !Flux._isleaf([x]')
@test !Flux._isleaf(transpose([x]))
@test !Flux._isleaf(PermutedDimsArray([x;;], (1, 2)))
end
end
end

@testset "Various destructure bugs" begin
Expand Down

0 comments on commit 70f6025

Please sign in to comment.