diff --git a/test/Misc.jl b/test/Misc.jl index c8795f52d6..54223ca9da 100644 --- a/test/Misc.jl +++ b/test/Misc.jl @@ -1,4 +1,5 @@ @testset "Misc" begin + include("Misc/Integer.jl") include("Misc/psibound.jl") include("Misc/FiniteField.jl") include("Misc/Primes.jl") diff --git a/test/Misc/Integer.jl b/test/Misc/Integer.jl new file mode 100644 index 0000000000..a360d57066 --- /dev/null +++ b/test/Misc/Integer.jl @@ -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 +