Skip to content

Commit 56193e3

Browse files
committed
fix coverage
1 parent 756f470 commit 56193e3

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/Argmax2D/Argmax2D.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,13 @@ $TYPEDSIGNATURES
103103
Plot the data sample for the [`Argmax2DBenchmark`](@ref).
104104
"""
105105
function Utils.plot_data(
106-
::Argmax2DBenchmark,
106+
bench::Argmax2DBenchmark,
107107
sample::DataSample;
108108
instance=sample.instance,
109109
θ=sample.θ_true,
110110
kwargs...,
111111
)
112-
pl = init_plot()
113-
plot_polytope!(pl, instance)
114-
plot_objective!(pl, θ)
115-
return plot_maximizer!(pl, θ, instance, maximizer)
112+
return Utils.plot_data(bench; instance, θ, kwargs...)
116113
end
117114

118115
export Argmax2DBenchmark

test/argmax.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
model = generate_statistical_model(b)
1515
maximizer = generate_maximizer(b)
1616

17+
gap = compute_gap(b, dataset, model, maximizer)
18+
@test gap >= 0
19+
1720
for (i, sample) in enumerate(dataset)
1821
(; x, θ_true, y_true) = sample
1922
@test size(x) == (nb_features, instance_dim)

test/argmax_2d.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
model = generate_statistical_model(b)
1414
maximizer = generate_maximizer(b)
1515

16+
gap = compute_gap(b, dataset, model, maximizer)
17+
@test gap >= 0
18+
1619
# Test plot_data
1720
figure = plot_data(b, dataset[1])
1821
@test figure isa Plots.Plot

0 commit comments

Comments
 (0)