Skip to content

Commit

Permalink
Fix "no method matching" test (#288)
Browse files Browse the repository at this point in the history
The text of the MethodError message is not a stable API, so use the
currently stable API of checking the field value. Discussion at
JuliaLang/julia#47369.

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
  • Loading branch information
apaz-cli and vtjnash authored Feb 8, 2023
1 parent d7d80af commit 102ded6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/higherorderfns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ using SparseArrays.HigherOrderFns: SparseVecStyle, SparseMatStyle
end
@test err isa MethodError
@test !occursin("is ambiguous", sprint(showerror, err))
@test occursin("no method matching _copy(::typeof(rand))", sprint(showerror, err))
@test err.f === SparseArrays.HigherOrderFns._copy
end

@testset "Sparse outer product, for type $T and vector $op" for
Expand Down

0 comments on commit 102ded6

Please sign in to comment.