From 20cdb37da4ba68e3404be1bfa74a276289e9df3d Mon Sep 17 00:00:00 2001 From: Utkarsh Date: Tue, 26 Sep 2023 00:46:36 -0400 Subject: [PATCH] fixup! add tests --- Project.toml | 3 ++- test/basictests.jl | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index fc6bf222c..6dec98e5b 100644 --- a/Project.toml +++ b/Project.toml @@ -62,6 +62,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" +DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" [targets] -test = ["Enzyme", "BenchmarkTools", "SafeTestsets", "Pkg", "Test", "ForwardDiff", "StaticArrays", "Symbolics", "LinearSolve", "Random", "LinearAlgebra", "Zygote", "SparseDiffTools", "NonlinearProblemLibrary"] +test = ["Enzyme", "BenchmarkTools", "SafeTestsets", "Pkg", "Test", "ForwardDiff", "StaticArrays", "Symbolics", "LinearSolve", "Random", "LinearAlgebra", "Zygote", "SparseDiffTools", "NonlinearProblemLibrary", "DiffEqBase"] diff --git a/test/basictests.jl b/test/basictests.jl index 5a50b5760..3602b23a8 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -1,5 +1,5 @@ using BenchmarkTools, LinearSolve, NonlinearSolve, StaticArrays, Random, LinearAlgebra, - Test, ForwardDiff, Zygote, Enzyme, SparseDiffTools + Test, ForwardDiff, Zygote, Enzyme, SparseDiffTools, DiffEqBase _nameof(x) = applicable(nameof, x) ? nameof(x) : _nameof(typeof(x)) @@ -428,7 +428,7 @@ end end termination_condition = NLSolveTerminationCondition(mode; abstol = nothing, reltol = nothing) - probN2 = NonlinearProblem(quadratic_f, u0, 2.0) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, LevenbergMarquardt(; termination_condition)).u .≈ sqrt(2.0)) end end