1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00
Commit graph

152 commits

Author SHA1 Message Date
Kevin Ryde
c1122753ac (integer-expt): New tests, of infinite exponents.
(integer?): Exercise nan and +/-inf.
2004-09-07 00:20:37 +00:00
Marius Vollmer
eb73f94b6a (number->string): Some results might differ between versions of Guile
compiled optimized and unoptimized.  Both results are accepted now.
2004-06-15 13:19:10 +00:00
Kevin Ryde
18ee5de9d4 * lib.scm (exception:numerical-overflow): New define.
* tests/numbers.test (modulo-expt): Use it and
exception:wrong-type-arg, avoiding empty "" regexp which is invalid on
BSD.  Reported by Andreas Vögele.
2004-05-29 22:13:27 +00:00
Marius Vollmer
d39a7b5881 (number->string): Added tests for non-radix-10 floating point
conversions.
2004-05-10 20:41:54 +00:00
Kevin Ryde
abff733bd7 (logbit?): New tests. 2004-05-09 22:53:24 +00:00
Kevin Ryde
7f703e0d21 (min): Correction, test "documented? min" not "documented? max". 2004-04-15 00:52:48 +00:00
Kevin Ryde
2530518ea9 (max, min): Exercise some inum/frac, frac/inum,
big/frac, frac/big and frac/frac cases.
2004-04-15 00:50:49 +00:00
Kevin Ryde
ad22fe7cf8 (quotient, remainder): Exercise inum/big at and
near special case inum == fixnum-min, big == -fixnum-min.
2004-04-05 23:05:37 +00:00
Kevin Ryde
24360e11b0 2004-03-26 Eric Hanchrow <offby1@blarg.net>
* tests/numbers.test (modulo-expt): New tests.
2004-03-25 21:46:35 +00:00
Kevin Ryde
23d77957a4 (min, max): Check inexactness of big/real and
real/big combinations, collect up tests under arg types for clarity.
2004-03-25 21:45:11 +00:00
Kevin Ryde
593a4c2f90 (max, min): Exercise some complex num cases. 2004-02-21 22:03:57 +00:00
Kevin Ryde
2a8b5e045f (=): Exercise frac+real and frac+complex. 2004-02-18 00:29:16 +00:00
Kevin Ryde
fe89421e30 (<): Add tests inum/bignum/flonum/frac with frac. 2004-01-06 21:48:33 +00:00
Kevin Ryde
76903a316a (abs): Add a few more tests. 2003-12-02 21:23:31 +00:00
Marius Vollmer
ca2b31fe08 #e1.2 is now exactly 12/10. Expect exceptions when calling inexact?
with a non-number.
2003-11-20 23:55:51 +00:00
Marius Vollmer
9dd9857f77 * tests/numbers.test ("string->number"): Expect exact rationals
for things like "1/2" and "#e1.2".
("inexact->exact"): Expect overflow error for infs and nans.

* tests/fractions.test: New file from Bill Schottstaedt.  Thanks!

* tests/bit-operations.test (fixnum-bit): Round the result so that
fixnum-bit really is an integer.
2003-11-18 19:57:30 +00:00
Kevin Ryde
a1fb3b1c11 Use define-module to hide helper defines.
(dbl-mant-dig, ash-flo): New helpers.
(exact->inexact): New tests.
2003-10-19 00:34:39 +00:00
Marius Vollmer
a409f865f0 (inexact->exact): Use corrent argument order for pass-if-exception.
Use "+inf.0" instead of "+.inf", etc.
2003-10-10 14:32:11 +00:00
Kevin Ryde
1259cb26f7 (inexact->exact): New tests. 2003-10-09 00:41:15 +00:00
Dirk Herrmann
47ae1f0eca * libguile/numbers.c (scm_bigequal): Fixed.
* test-suite/tests/numbers.test (equal?): Added tests.

	* test-suite/tests/numbers.test (=): Fixed and added some bignum
        related tests.
2003-09-17 21:03:26 +00:00
Kevin Ryde
1ec2dd6fd2 (lognot): Add tests. 2003-08-30 00:00:58 +00:00
Kevin Ryde
ef016629d0 (-): Exercise bignum - inum. 2003-08-22 01:23:14 +00:00
Dirk Herrmann
4d332f190c * tests/numbers.test: Eliminated misuses of expect-fail. It
should only be used in cases, where guile has a known bug.  It
	should not be used in cases where an expression is expected to
	return #f as its correct result.
2003-08-10 13:19:54 +00:00
Kevin Ryde
cfc9fc1c82 (angle): New tests. 2003-07-24 01:00:10 +00:00
Kevin Ryde
65ea251e5b (*): Add complex/bignum test. 2003-07-18 00:01:55 +00:00
Kevin Ryde
d40681ec4b (make-polar, magnitude): New tests. 2003-07-08 00:32:01 +00:00
Kevin Ryde
14a6784cf1 (truncate, round, asinh, acosh, atanh): Add some tests. 2003-06-21 00:17:23 +00:00
Kevin Ryde
795c0baec6 (logcount): Add a few more tests, to exercise
recent scm_logcount change.
2003-06-04 16:12:09 +00:00
Kevin Ryde
501da40398 (max, min): Add tests involving NaNs. 2003-05-30 00:24:33 +00:00
Kevin Ryde
adda36ed70 (=, <, max, min): Add tests of bignum/inf combinations. 2003-05-12 23:52:17 +00:00
Kevin Ryde
db386f80d1 (gcd): Exercise bignum/inum with a bignum not
fitting a ulong.
2003-05-10 00:23:00 +00:00
Kevin Ryde
a04a3604c2 (integer-length): Exercise some negatives, in
particular -2^n which is ...11100..00.
2003-05-10 00:10:40 +00:00
Kevin Ryde
2cfcaed525 (=, <): Add tests involving NaNs. 2003-05-10 00:07:34 +00:00
Kevin Ryde
300c6a76b3 (logcount): New tests, exercising some negatives. 2003-05-05 23:04:02 +00:00
Kevin Ryde
072e6de2ed (-): Add test for negative inum subtract bignum. 2003-05-05 22:59:03 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
7c24e52857 * tests/numbers.test: added tests (some simple) for various funcs.
("odd?"): added tests.
("even?"): added tests.
("nan?"): added tests.
("abs"): added tests.
("lcm"): added tests.
("number->string"): added tests.
("number?"): added tests.
("complex?"): added tests.
("real?"): added tests.
("rational?"): added tests.
("integer?"): added tests.
("inexact?"): added tests.
("="): added tests.
("zero?"): added tests.
("positive?"): added tests.
("negative?"): added tests.
2003-03-25 02:20:55 +00:00
Rob Browning
46f2c0f148 * tests/numbers.test ("expt"): add tests. 2002-10-05 04:12:23 +00:00
Marius Vollmer
cdf52e3dce (/): Expect divison by an inexact zero to yield +inf.0. 2002-05-07 18:10:59 +00:00
Marius Vollmer
469b963c66 New tests for complex division. 2002-03-11 19:10:28 +00:00
Dirk Herrmann
80074d7799 * tests/numbers.test: Added more division by zero tests. 2001-11-22 21:33:15 +00:00
Dirk Herrmann
1b3a7932ca * tests/numbers.test: Added division by zero tests. 2001-11-21 23:25:40 +00:00
Dirk Herrmann
b7d9b1cf5a * tests/numbers.test: Added a test case that checks if valid
number strings are transformed correctly by string->number.
2001-10-13 12:29:44 +00:00
Rob Browning
8b7838b558 * tests/numbers.test (fixnum-bit): compute dynamically. 2001-09-21 17:54:27 +00:00
Dirk Herrmann
569c483b32 * Improved the readability of some patterns. 2001-08-31 14:48:19 +00:00
Dirk Herrmann
2f4a254ac9 * Added some syntax tests for numbers. 2001-08-11 16:59:42 +00:00
Martin Grabmüller
96e30d2ab2 * tests/alist.test, tests/bit-operations.test,
tests/common-list.test, tests/environments.test, tests/eval.test,
	tests/gc.test, tests/hooks.test, tests/import.test,
	tests/interp.test, tests/list.test, tests/load.test,
	tests/numbers.test, tests/ports.test, tests/r4rs.test,
	tests/version.test, tests/weaks.test, lib.scm, guile-test: Updated
	copyright notice.
2001-07-19 20:30:37 +00:00
Dirk Herrmann
f29b345439 * Moved the number related tests from exceptions.test to numbers.test. 2001-03-01 22:00:02 +00:00
Dirk Herrmann
5c96bc39a4 * Make sure that tests return a boolean value. 2001-02-28 08:41:06 +00:00
Dirk Herrmann
21e39e8fe6 * Converted to real boundary testing. 2001-01-18 17:24:10 +00:00