Skip to content

Commit 19e4c0d

Browse files
authored
Fix dimension of VectorNonlinearOracle in test and docstring (#2874)
1 parent 89d0708 commit 19e4c0d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Test/test_basic_constraint.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ end
177177

178178
function _set(::Type{T}, ::Type{MOI.VectorNonlinearOracle}) where {T}
179179
set = MOI.VectorNonlinearOracle(;
180-
dimension = 3,
180+
dimension = 4,
181181
l = T[0, 0],
182182
u = T[1, 0],
183183
eval_f = (ret, x) -> begin
@@ -194,7 +194,8 @@ function _set(::Type{T}, ::Type{MOI.VectorNonlinearOracle}) where {T}
194194
return
195195
end,
196196
)
197-
x, ret_f, ret_J = T[1, 2, 3, 4, 5], T[0, 0], T[0, 0, 0, 0]
197+
@assert MOI.dimension(set) == 4
198+
x, ret_f, ret_J = T[1, 2, 3, 4], T[0, 0], T[0, 0, 0, 0]
198199
set.eval_f(ret_f, x)
199200
set.eval_jacobian(ret_J, x)
200201
return set

src/sets.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2739,7 +2739,7 @@ do
27392739
julia> import MathOptInterface as MOI
27402740
27412741
julia> set = MOI.VectorNonlinearOracle(;
2742-
dimension = 3,
2742+
dimension = 4,
27432743
l = [0.0, 0.0],
27442744
u = [1.0, 0.0],
27452745
eval_f = (ret, x) -> begin
@@ -2766,7 +2766,7 @@ julia> set = MOI.VectorNonlinearOracle(;
27662766
27672767
julia> set
27682768
VectorNonlinearOracle{Float64}(;
2769-
dimension = 3,
2769+
dimension = 4,
27702770
l = [0.0, 0.0],
27712771
u = [1.0, 0.0],
27722772
...,

0 commit comments

Comments
 (0)