Skip to content

Commit

Permalink
Merge pull request #58 from JuliaReach/schillic/aqua
Browse files Browse the repository at this point in the history
Run Aqua in tests and fix problems
  • Loading branch information
schillic authored Feb 27, 2024
2 parents 0b9724c + 71a3b70 commit 241ae9a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/BernsteinExpansions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ include("implicit.jl")
include("full.jl")

export ImplicitBernsteinForm,
ExplicitBernsteinForm,
FullBernsteinForm

# Range enclosure methods
Expand Down
3 changes: 2 additions & 1 deletion src/monomials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ function multivariate(m::AbstractMonomialLike, l::AbstractVector{Int},
end

# Bernstein coefficients for multivariate terms like 4x²y; uses linearity property
function multivariate(t::AbstractTermLike, l::AbstractVector{Int}, dom::IntervalBox)
function multivariate(t::AbstractTermLike, l::AbstractVector{Int},
dom::IntervalBox{D,N}) where {D,N}
m = monomial(t)
α = coefficient(t)
coeffs = multivariate(m, l, dom)
Expand Down
9 changes: 9 additions & 0 deletions test/Aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using BernsteinExpansions, Test
import Aqua

@testset "Aqua tests" begin
Aqua.test_all(BernsteinExpansions; ambiguities=false)

# do not warn about ambiguities in dependencies
Aqua.test_ambiguities(BernsteinExpansions)
end
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DynamicPolynomials = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.8"
DynamicPolynomials = "0.4 - 0.5"
StaticArrays = "1.2"
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ end

# TODO: add tests for multivariate (ref Smith's thesis)
#

include("Aqua.jl")

0 comments on commit 241ae9a

Please sign in to comment.