Skip to content

Commit fac9b27

Browse files
Michael Abbottmcabbott
authored andcommitted
+ tests
1 parent 2ed13f2 commit fac9b27

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
@@ -52,8 +52,9 @@
5252
end
5353
T == Float64 && ndims(x) == 1 && @testset "Integer input" begin
5454
x = [1,2,3]
55-
_, int_back = rrule(fnorm, x)
56-
_, float_back = rrule(fnorm, float(x))
55+
int_fwd, int_back = rrule(fnorm, x)
56+
float_fwd, float_back = rrule(fnorm, float(x))
57+
@test int_fwd float_fwd
5758
@test unthunk(int_back(1.0)[2]) unthunk(float_back(1.0)[2])
5859
end
5960
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)