Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 24a6c97

Browse files
more tests
1 parent 39a4dea commit 24a6c97

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/misc_tests.jl

+4-3
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,13 @@ end
167167
x
168168
end
169169
Functors.@functor Tleaf
170-
171170
MLDataDevices.isleaf(::Tleaf) = true
172-
173171
Adapt.adapt_structure(dev::CPUDevice, t::Tleaf) = Tleaf(2 .* dev(t.x))
174172

175173
cpu = cpu_device()
176174
t = Tleaf(ones(2))
177-
@test cpu(t).x == 2 .* ones(2)
175+
t = cpu(t)
176+
@test y.x == 2 .* ones(2)
177+
y = cpu([(t,)])
178+
@test y[1][1].x == 2 .* ones(2)
178179
end

0 commit comments

Comments
 (0)