From b58355e024d0102a2208b1ad7ad94df6af18f0fc 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 c3cb802a8..ff58f8560 100644 --- a/Project.toml +++ b/Project.toml @@ -74,6 +74,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", "LeastSquaresOptim", "FastLevenbergMarquardt"] +test = ["Enzyme", "BenchmarkTools", "SafeTestsets", "Pkg", "Test", "ForwardDiff", "StaticArrays", "Symbolics", "LinearSolve", "Random", "LinearAlgebra", "Zygote", "SparseDiffTools", "NonlinearProblemLibrary", "LeastSquaresOptim", "FastLevenbergMarquardt", "DiffEqBase"] diff --git a/test/basictests.jl b/test/basictests.jl index 250a2e8b4..7135b4901 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)) @@ -429,7 +429,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