From d349be45a7bc63868625244cfb0327c3698c421b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Sat, 10 Feb 2024 22:11:51 +0100 Subject: [PATCH] Allow Groups of order > 2^15 in conformance test --- test/Groups-conformance-tests.jl | 9 +++++++-- test/generic/PermGroupAPI-test.jl | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/Groups-conformance-tests.jl b/test/Groups-conformance-tests.jl index ad35a390c3..12b2edbe2c 100644 --- a/test/Groups-conformance-tests.jl +++ b/test/Groups-conformance-tests.jl @@ -57,8 +57,13 @@ function test_Group_interface(G::Group) @testset "order, rand" begin if is_finite(G) - @test order(Int16, G) isa Int16 - @test order(BigInt, G) isa BigInt + ord = order(BigInt, G) + @test ord isa BigInt + if ord < typemax(Int16) + @test order(Int16, G) isa Int16 + else + @test_throws InexactError order(Int16, G) + end @test order(G) >= 1 @test is_trivial(G) == (order(G) == 1) else diff --git a/test/generic/PermGroupAPI-test.jl b/test/generic/PermGroupAPI-test.jl index e73dee6b96..e2abf19c7d 100644 --- a/test/generic/PermGroupAPI-test.jl +++ b/test/generic/PermGroupAPI-test.jl @@ -1,7 +1,7 @@ @testset "GroupsCore API PermGroup" begin include(joinpath(dirname(dirname(pathof(AbstractAlgebra))), "test", "Groups-conformance-tests.jl")) - @testset "Sym($n)" for n in [1,2,5] + @testset "Sym($n)" for n in [1,2,5,10] G = SymmetricGroup(n) test_Group_interface(G) test_GroupElem_interface(rand(G, 2)...)