Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for Integer.jl #1351

Merged
merged 10 commits into from
Feb 20, 2024
Merged
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
1 change: 1 addition & 0 deletions test/Misc.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@testset "Misc" begin
include("Misc/Integer.jl")
include("Misc/psibound.jl")
include("Misc/FiniteField.jl")
include("Misc/Primes.jl")
Expand Down
35 changes: 35 additions & 0 deletions test/Misc/Integer.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@testset "Integers" begin


@test is_commutative(ZZ)

@test modord(2,3) == 2

@test modord(ZZ(2),ZZ(3)) == ZZ(2)

@test sort(euler_phi_inv(ZZ(4))) == [ZZ(5), ZZ(8), ZZ(10), ZZ(12)]

@test Hecke.is_prime_power(ZZ(8))

@test Hecke.is_prime_power(8)

@test sort(euler_phi_inv(2)) == [3,4,6]

@test euler_phi(ZZ(5)) == ZZ(4)

@test carmichael_lambda(ZZ(8)) == ZZ(2)

@test sort(evaluate.(Hecke.euler_phi_inv_fac_elem(ZZ(4)))) == ZZ.([5, 8 ,10 ,12])

@test carmichael_lambda(ZZ(1*2^3)) == ZZ(2)

@test carmichael_lambda(8) == 2

@test sort(Hecke.squarefree_up_to(2)) == [1,2]

@test support(QQ(2)) == [2]



end

Loading