From 798cb94cfbe321dc1ab792376354248b5d65680d Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 6 Jan 2025 14:47:20 +1300 Subject: [PATCH] Update C_API.jl --- test/C_API.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/C_API.jl b/test/C_API.jl index f4e1fa5..aeae14c 100644 --- a/test/C_API.jl +++ b/test/C_API.jl @@ -567,7 +567,11 @@ function test_algorithm_name() sol = "Limited-memory BFGS (L-BFGS) (local, derivative-based)" @test algorithm_name(algorithm) == sol @test algorithm_name(:LD_LBFGS) == sol - @test algorithm_name(10) == sol + if NLopt._is_version_newer_than_2_9() + @test algorithm_name(10) == sol + else + @test algorithm_name(11) == sol + end opt = Opt(:LD_LBFGS, 2) @test algorithm_name(opt) == sol sprint(show, algorithm_name(:LD_LBFGS))