Skip to content

Commit

Permalink
tests: merge log2.tst and some bugfix tests into intarith.tst
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jan 11, 2017
1 parent 68815d8 commit 063d21f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
20 changes: 20 additions & 0 deletions tst/testinstall/intarith.tst
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,26 @@ gap> List(data, Log2Int);
[ 66, 66, 13, 0, -1, 0, 13, 66, 66 ]
gap> Log2Int("abc");
Error, Log2Int: argument must be an integer (not a list (string))
gap> List([-5..5], Log2Int);
[ 2, 2, 1, 1, 0, -1, 0, 1, 1, 2, 2 ]
gap> ForAll([2..100], x -> Log2Int(2^x) = x and
> Log2Int(2^x-1) = x-1 and
> Log2Int(2^x+1) = x);
true
gap> ForAll([2..100], x -> Log2Int(-(2^x)) = x and
> Log2Int(-(2^x)-1) = x and
> Log2Int(-(2^x)+1) = x-1);
true

# corner cases
gap> Log2Int( 2^28 );
28
gap> Log2Int( -2^28 );
28
gap> Log2Int( 2^60 );
60
gap> Log2Int( -2^60 );
60

#
# string to integer conversion
Expand Down
12 changes: 0 additions & 12 deletions tst/testinstall/log2.tst

This file was deleted.

9 changes: 0 additions & 9 deletions tst/teststandard/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -1808,15 +1808,6 @@ true
gap> (Z(65536)^2)^LogFFE(Z(65536)^16386,Z(65536)^2) = Z(65536)^16386;
true

# Reported by TB on 2009/11/09, added by AK on 2011/01/20
# Log2Int(2^60) bug (a 64bit/GMP issue)
gap> Log2Int( 2^60 );
60

# Reported by Chris Jefferson on 20151008 in github issue #282
gap> Log2Int( -2^60 );
60

# Reported by WDeMeo on 2011/02/19, added by JS on 2011/03/09
# IntermediateSubgroups(G,normal) included non-maximal inclusions
gap> g:=CyclicGroup(2^6);; IntermediateSubgroups( g, TrivialSubgroup(g) ).inclusions;
Expand Down

0 comments on commit 063d21f

Please sign in to comment.