Skip to content

Commit

Permalink
Add missing cmp(QQFieldElem, Integer)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Sep 26, 2024
1 parent a2b7449 commit 64c37d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flint/fmpq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ function cmp(a::QQFieldElemOrPtr, b::UInt)
@ccall libflint.fmpq_cmp_ui(a::Ref{QQFieldElem}, b::UInt)::Cint

Check warning on line 356 in src/flint/fmpq.jl

View check run for this annotation

Codecov / codecov/patch

src/flint/fmpq.jl#L355-L356

Added lines #L355 - L356 were not covered by tests
end

cmp(a::Union{ZZRingElemOrPtr, Int, UInt}, b::QQFieldElemOrPtr) = -cmp(b, a)
cmp(a::QQFieldElemOrPtr, b::Integer) = cmp(a, ZZRingElem(b))

Check warning on line 359 in src/flint/fmpq.jl

View check run for this annotation

Codecov / codecov/patch

src/flint/fmpq.jl#L359

Added line #L359 was not covered by tests

cmp(a::Union{ZZRingElemOrPtr, Integer}, b::QQFieldElemOrPtr) = -cmp(b, a)

function ==(a::QQFieldElem, b::QQFieldElem)
return ccall((:fmpq_equal, libflint), Bool,
Expand Down

0 comments on commit 64c37d2

Please sign in to comment.