Skip to content

Commit

Permalink
Added tests for Integer.jl (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreevatsa2k authored and fieker committed Apr 2, 2024
1 parent b68b10f commit 61da290
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
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

0 comments on commit 61da290

Please sign in to comment.