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 Jan 25, 2024
1 parent db39e48 commit 8ec0e2b
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 "copysign" begin
# don't go too close to zero as the numerics may jump over it yielding wrong results
Expand All @@ -10,10 +14,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 8ec0e2b

Please sign in to comment.