From 0ff449a9496e7c8533693a964b094485e0d39a1c Mon Sep 17 00:00:00 2001 From: Frames White Date: Tue, 16 Jan 2024 16:55:47 +0800 Subject: [PATCH] move struct defn in tests to top level --- test/rulesets/Base/base.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/rulesets/Base/base.jl b/test/rulesets/Base/base.jl index 5bda3072e..18108f371 100644 --- a/test/rulesets/Base/base.jl +++ b/test/rulesets/Base/base.jl @@ -1,3 +1,7 @@ +mutable struct MDemo + x::Float64 +end + @testset "base.jl" begin @testset "zero/one" begin for f in [zero, one] @@ -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