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 7 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
26 changes: 26 additions & 0 deletions test/Misc/Integer.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@testset "Integers" begin


@test is_commutative(ZZ) == true
Sreevatsa2k marked this conversation as resolved.
Show resolved Hide resolved

@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 is_prime_power(ZZ(8)) == true
Sreevatsa2k marked this conversation as resolved.
Show resolved Hide resolved

@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])
Sreevatsa2k marked this conversation as resolved.
Show resolved Hide resolved

@test carmichael_lambda(ZZ(1*2^3)) == ZZ(2)
Sreevatsa2k marked this conversation as resolved.
Show resolved Hide resolved

@test carmichael_lambda(8) == 2
Sreevatsa2k marked this conversation as resolved.
Show resolved Hide resolved



end