From 1adffbc81c8c8f37bc4c58974b2c13f46a2a790c Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sun, 26 Mar 2023 00:29:36 -0400 Subject: [PATCH 1/2] update and fix tests --- test/partitions_test.jl | 2 +- test/upstream.jl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/partitions_test.jl b/test/partitions_test.jl index 98dec3a6..c8a3418e 100644 --- a/test/partitions_test.jl +++ b/test/partitions_test.jl @@ -1,4 +1,4 @@ -using RecursiveArrayTools, Test, Statistics, ArrayInterfaceCore +using RecursiveArrayTools, Test, Statistics, ArrayInterface A = (rand(5), rand(5)) p = ArrayPartition(A) @test (p.x[1][1], p.x[2][1]) == (p[1], p[6]) diff --git a/test/upstream.jl b/test/upstream.jl index 158c05bc..467fa8ff 100644 --- a/test/upstream.jl +++ b/test/upstream.jl @@ -1,11 +1,11 @@ -using OrdinaryDiffEq, NLsolve, RecursiveArrayTools, Test, ArrayInterfaceCore +using OrdinaryDiffEq, NLsolve, RecursiveArrayTools, Test, ArrayInterface function lorenz(du, u, p, t) du[1] = 10.0 * (u[2] - u[1]) du[2] = u[1] * (28.0 - u[3]) - u[2] du[3] = u[1] * u[2] - (8 / 3) * u[3] end u0 = ArrayPartition([1.0, 0.0], [0.0]) -@test ArrayInterfaceCore.zeromatrix(u0) isa Matrix +@test ArrayInterface.zeromatrix(u0) isa Matrix tspan = (0.0, 100.0) prob = ODEProblem(lorenz, u0, tspan) sol = solve(prob, Tsit5()) @@ -39,16 +39,16 @@ end @test solve(ODEProblem(dyn, ArrayPartition(ArrayPartition(zeros(1), [-1.0]), ArrayPartition(zeros(1), [0.75])), - (0.0, 1.0)), AutoTsit5(Rodas5())).retcode == :Success + (0.0, 1.0)), AutoTsit5(Rodas5())).retcode == ReturnCode.Success if VERSION < v"1.7" @test solve(ODEProblem(dyn, ArrayPartition(ArrayPartition(zeros(1), [-1.0]), ArrayPartition(zeros(1), [0.75])), - (0.0, 1.0)), Rodas5()).retcode == :Success + (0.0, 1.0)), Rodas5()).retcode == ReturnCode.Success else @test_broken solve(ODEProblem(dyn, ArrayPartition(ArrayPartition(zeros(1), [-1.0]), ArrayPartition(zeros(1), [0.75])), - (0.0, 1.0)), Rodas5()).retcode == :Success + (0.0, 1.0)), Rodas5()).retcode == ReturnCode.Success end From d9990febca2c56dfa6120b226979724516b552ff Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sun, 26 Mar 2023 00:39:32 -0400 Subject: [PATCH 2/2] more core --- test/partitions_test.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/partitions_test.jl b/test/partitions_test.jl index c8a3418e..7caba936 100644 --- a/test/partitions_test.jl +++ b/test/partitions_test.jl @@ -190,7 +190,7 @@ up = ap .+ 1 up = 2 .* ap .+ 1 @test typeof(ap) == typeof(up) -@testset "ArrayInterfaceCore.ismutable(ArrayPartition($a, $b)) == $r" for (a, b, r) in ((1, +@testset "ArrayInterface.ismutable(ArrayPartition($a, $b)) == $r" for (a, b, r) in ((1, 2, false), ([ @@ -205,7 +205,7 @@ up = 2 .* ap .+ 1 2, ], true)) - @test ArrayInterfaceCore.ismutable(ArrayPartition(a, b)) == r + @test ArrayInterface.ismutable(ArrayPartition(a, b)) == r end # Test unary minus