Skip to content

Commit a64b0d1

Browse files
authored
Omit allocation test due to changes in sort on nightly (#2018)
1 parent d364d1d commit a64b0d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Utilities/functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ function _sort_and_compress!(x::Vector)
833833
if length(x) == 0
834834
return
835835
end
836-
sort!(x, QuickSort, Base.Order.ord(isless, MOI.term_indices, false))
836+
sort!(x; by = MOI.term_indices)
837837
i = 1
838838
@inbounds for j in 2:length(x)
839839
if MOI.term_indices(x[i]) == MOI.term_indices(x[j])

test/Utilities/functions.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,9 @@ function _test_canonicalization(
10561056
@test MOI.Utilities.is_canonical(expected)
10571057
@test _isapprox_ordered(MOI.Utilities.canonical(g), g)
10581058
@test MOI.Utilities.canonical(g) !== g
1059-
@test @allocated(MOI.Utilities.canonicalize!(f)) == 0
1059+
# There are some changes to sorting in Julia v1.9 that now mean sorting
1060+
# allocates.
1061+
# @test @allocated(MOI.Utilities.canonicalize!(f)) == 0
10601062
return
10611063
end
10621064

0 commit comments

Comments
 (0)