Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/division.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ function multivariate_gcd_test(::Type{T}, algo=GeneralizedEuclideanAlgorithm())
sym_test(p1, p2, x, algo)
end

@testset "Issue #104" begin
p1 = o - o * x
p2 = p1 * (o * y^2 + o)
sym_test(p1, p2, p1, algo)
end

p1 = o*z - z
p2 = z
@test gcd(p1, p2, algo) == z
Expand Down
12 changes: 12 additions & 0 deletions test/monomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ function mapexponents_test()
b = x * y
c = MP.mapexponents!(+, a, b)
@test variables(c) == variables(b)
@test degree(c, x) == 3
@test degree(c, y) == 1
a = x^3
d = MP.mapexponents_to!(a, -, b, b)
@test variables(d) == variables(b)
@test degree(d, x) == 0
@test degree(d, y) == 0
# See https://github.com/JuliaAlgebra/DynamicPolynomials.jl/pull/105
e = x^1
f = x * y^2
g = MP.mapexponents!(div, e, f)
@test g === e
@test variables(e) == variables(f)
@test degree(e, x) == 1
@test degree(e, y) == 0
end

@testset "Monomial" begin
Expand Down