Skip to content

Commit df02563

Browse files
author
Michael Abbott
committed
+ tests
1 parent bafa3ba commit df02563

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/rulesets/LinearAlgebra/norm.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@
5555
end
5656
T == Float64 && ndims(x) == 1 && @testset "Integer input" begin
5757
x = [1,2,3]
58-
_, int_back = rrule(fnorm, x)
59-
_, float_back = rrule(fnorm, float(x))
58+
int_fwd, int_back = rrule(fnorm, x)
59+
float_fwd, float_back = rrule(fnorm, float(x))
60+
@test int_fwd float_fwd
6061
@test unthunk(int_back(1.0)[2]) unthunk(float_back(1.0)[2])
6162
end
6263
end
@@ -135,8 +136,9 @@
135136
@test rrule(fnorm, x, p)[2](Zero())[2] isa Zero
136137
T == Float64 && sz == (3,) && @testset "Integer input, p=$p" begin
137138
x = [1,2,3]
138-
_, int_back = rrule(fnorm, x, p)
139-
_, float_back = rrule(fnorm, float(x), p)
139+
int_fwd, int_back = rrule(fnorm, x, p)
140+
float_fwd, float_back = rrule(fnorm, float(x), p)
141+
@test int_fwd float_fwd
140142
@test unthunk(unthunk(int_back(1.0)[2])) unthunk(unthunk(float_back(1.0)[2]))
141143
end
142144
end

0 commit comments

Comments
 (0)