Skip to content

Commit d19a203

Browse files
More testsets
1 parent f312733 commit d19a203

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/helper_functions.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,22 @@
1111
@test ChainRules._update!(X, Diagonal([1, 1])) == [2 2; 3 5]
1212
@test X != Y # X has been updated
1313
end
14-
1514
@testset "_update! Zero" begin
1615
X = [1 2; 3 4]
1716
@test ChainRules._update!(X, Zero()) === X
1817
@test ChainRules._update!(Zero(), X) === X
1918
@test ChainRules._update!(Zero(), Zero()) === Zero()
20-
19+
end
20+
@testset "_update! NamedTuple" begin
2121
X = (A=[1 0; 0 1], B=[2 2; 2 2])
2222
Y = deepcopy(X)
2323
@test ChainRules._update!(X, Y) == (A=[2 0; 0 2], B=[4 4; 4 4])
2424
@test X.A != Y.A
2525
@test X.B != Y.B
2626
end
27-
2827
@testset "_checked_rrule" begin
2928
try
30-
@eval cool(x,y)= x + y
29+
@eval cool(x,y) = x + y
3130
# We defined a 2-arg method for `cool` but no `rrule`
3231
ChainRules._checked_rrule(cool, 1.0, 2.0)
3332
catch e

0 commit comments

Comments
 (0)