From: Alex M. <al...@us...> - 2006-02-26 07:37:05
|
Update of /cvsroot/gmpy/gmpy/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24545/test Modified Files: gmpy_test.py gmpy_test_cvr.py gmpy_test_mpq.py gmpy_test_mpz.py Log Message: Added fixes for 64-bit build (from dmcooke's patch) Index: gmpy_test.py =================================================================== RCS file: /cvsroot/gmpy/gmpy/test/gmpy_test.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gmpy_test.py 26 Feb 2006 07:08:18 -0000 1.7 --- gmpy_test.py 26 Feb 2006 07:36:59 -0000 1.8 *************** *** 34,39 **** pf, pt = 0, 0 for x in test_modules: print x.__name__, - failures, tests = x._test() print "%3d tests, %d failures" % (tests-pt, failures-pf) pf, pt = failures, tests --- 34,41 ---- pf, pt = 0, 0 for x in test_modules: + testit = x._test() + failures, tests = testit + if tests == 0: continue print x.__name__, print "%3d tests, %d failures" % (tests-pt, failures-pf) pf, pt = failures, tests Index: gmpy_test_cvr.py =================================================================== RCS file: /cvsroot/gmpy/gmpy/test/gmpy_test_cvr.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gmpy_test_cvr.py 26 Feb 2006 07:08:19 -0000 1.6 --- gmpy_test_cvr.py 26 Feb 2006 07:36:59 -0000 1.7 *************** *** 170,174 **** File "<stdin>", line 1, in ? ValueError: invalid digits ! >>> int(_g.mpz(1000*1000*1000*1000L)) Traceback (most recent call last): File "<stdin>", line 1, in ? --- 170,174 ---- File "<stdin>", line 1, in ? ValueError: invalid digits ! >>> int(_g.mpz(1000L*1000*1000*1000*1000*1000*1000)) Traceback (most recent call last): File "<stdin>", line 1, in ? *************** *** 348,352 **** File "<stdin>", line 1, in ? ValueError: mpz.pow with negative power ! >>> _g.mpz(2)**_g.mpz(1000000*1000000L) Traceback (most recent call last): File "<stdin>", line 1, in ? --- 348,352 ---- File "<stdin>", line 1, in ? ValueError: mpz.pow with negative power ! >>> _g.mpz(2)**_g.mpz(1000000*10000000000000L) Traceback (most recent call last): File "<stdin>", line 1, in ? *************** *** 362,366 **** File "<stdin>", line 1, in ? ValueError: mpq.pow no modulo allowed ! >>> a=1000000L**2 >>> _g.mpq(2)**a Traceback (most recent call last): --- 362,366 ---- File "<stdin>", line 1, in ? ValueError: mpq.pow no modulo allowed ! >>> a=10000000000L**2 >>> _g.mpq(2)**a Traceback (most recent call last): Index: gmpy_test_mpq.py =================================================================== RCS file: /cvsroot/gmpy/gmpy/test/gmpy_test_mpq.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gmpy_test_mpq.py 26 Feb 2006 07:08:19 -0000 1.7 --- gmpy_test_mpq.py 26 Feb 2006 07:36:59 -0000 1.8 *************** *** 213,222 **** >>> a.digits(30) '1b/52' ! >>> _g.mpq(1000*1000*1000*1000L,23) ! mpq(1000000000000L,23) ! >>> _g.mpq(23,1000*1000*1000*1000L) ! mpq(23,1000000000000L) ! >>> _g.mpq(23L**10L,1000L**4L) ! mpq(41426511213649L,1000000000000L) >>> _g.qbinary('pep') Traceback (most recent call last): --- 213,222 ---- >>> a.digits(30) '1b/52' ! >>> _g.mpq(1000L*1000*1000*1000*1000*1000*1000,23) ! mpq(1000000000000000000000L,23) ! >>> _g.mpq(23,1000L*1000*1000*1000*1000*1000*1000) ! mpq(23,1000000000000000000000L) ! >>> _g.mpq(23L**15L,1000L**7L) ! mpq(266635235464391245607L,1000000000000000000000L) >>> _g.qbinary('pep') Traceback (most recent call last): Index: gmpy_test_mpz.py =================================================================== RCS file: /cvsroot/gmpy/gmpy/test/gmpy_test_mpz.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gmpy_test_mpz.py 26 Feb 2006 07:08:19 -0000 1.11 --- gmpy_test_mpz.py 26 Feb 2006 07:36:59 -0000 1.12 *************** *** 81,86 **** >>> abs(-a)==a 1 ! >>> pow(a,7) ! mpz(425927596977747L) >>> pow(a,7,b) mpz(99) --- 81,86 ---- >>> abs(-a)==a 1 ! >>> pow(a,10) ! mpz(792594609605189126649L) >>> pow(a,7,b) mpz(99) *************** *** 160,166 **** >>> _g.mpz(-23L) mpz(-23) ! >>> x=1000*1000*1000*1000L >>> _g.mpz(x) ! mpz(1000000000000L) >>> try: print cmp(_g.mpz(1), _g.mpz(-1)) ... except: print 'ouch!' --- 160,166 ---- >>> _g.mpz(-23L) mpz(-23) ! >>> x=1000L*1000*1000*1000*1000*1000*1000 >>> _g.mpz(x) ! mpz(1000000000000000000000L) >>> try: print cmp(_g.mpz(1), _g.mpz(-1)) ... except: print 'ouch!' *************** *** 540,545 **** a.kronecker(3, 4) TypeError: function takes exactly 1 argument (2 given) ! >>> a=1000000L**2 ! >>> b=a+1 >>> _g.jacobi(a,b) 1 --- 540,545 ---- a.kronecker(3, 4) TypeError: function takes exactly 1 argument (2 given) ! >>> a=10L**20 ! >>> b=a+39 >>> _g.jacobi(a,b) 1 |