Skip to content

Commit

Permalink
move struct defn in tests to top level
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Feb 1, 2024
1 parent 96db615 commit 0ff449a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/rulesets/Base/base.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
mutable struct MDemo
x::Float64
end

@testset "base.jl" begin
@testset "zero/one" begin
for f in [zero, one]
Expand All @@ -20,10 +24,6 @@
end

@testset "setfield!" begin
mutable struct MDemo
x::Float64
end

test_frule(setfield!, MDemo(3.5) MutableTangent{MDemo}(; x=2.0), :x, 5.0)
test_frule(setfield!, MDemo(3.5) MutableTangent{MDemo}(; x=2.0), 1, 5.0)
end
Expand Down

0 comments on commit 0ff449a

Please sign in to comment.