From 734a6c46c9d8522bd238f40bf8e9cc442bc6973e Mon Sep 17 00:00:00 2001 From: lxvm Date: Wed, 17 Jan 2024 14:07:13 -0500 Subject: [PATCH] update zip test for nothings --- test/lib/array.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lib/array.jl b/test/lib/array.jl index 7b11e635a..8016c9541 100644 --- a/test/lib/array.jl +++ b/test/lib/array.jl @@ -33,8 +33,8 @@ end @testset "adjoints of Iterators.zip" begin y, back = _pullback(Iterators.zip, 1:5, 1:3, 1:2) @test back(collect(y)) == (nothing, [1.0, 2.0, 0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [1.0, 2.0]) - @test back([(nothing, j, k) for (i,j,k) in zip(1:5, 1:3, 1:2)]) == (nothing, Union{Nothing, Float64}[nothing, nothing, 0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [1.0, 2.0]) - @test back([(i, nothing, k) for (i,j,k) in zip(1:5, 1:3, 1:2)]) == (nothing, [1.0, 2.0, 0.0, 0.0, 0.0], Union{Nothing, Float64}[nothing, nothing, 0.0], [1.0, 2.0]) + @test back([(nothing, j, k) for (i,j,k) in zip(1:5, 1:3, 1:2)]) == (nothing, nothing, [1.0, 2.0, 0.0], [1.0, 2.0]) + @test back([(i, nothing, k) for (i,j,k) in zip(1:5, 1:3, 1:2)]) == (nothing, [1.0, 2.0, 0.0, 0.0, 0.0], nothing, [1.0, 2.0]) @test back([(i, j, nothing) for (i,j,k) in zip(1:5, 1:3, 1:2)]) == (nothing, [1.0, 2.0, 0.0, 0.0, 0.0], [1.0, 2.0, 0.0], nothing)