1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

1263 commits

Author SHA1 Message Date
Dirk Herrmann
4faa1ea021 * tests/syntax.test (exception:missing/extra-expr-syntax): Fixed
to be unaware of whether line number information is given or not.
2003-10-12 13:38:58 +00:00
Dirk Herrmann
4610b011a7 * libguile/eval.c (s_duplicate_binding): New static identifier.
(scm_m_case): Call scm_c_memq instead of implementing it inline.

	(scm_m_define): Added comment about how we check for duplicate
	formals.

	(scm_m_do): Added check for duplicate bindings.

	(scm_m_if): Use ASSERT_SYNTAX to signal syntax errors.  Avoid
	unnecessary consing when creating the memoized code.

	(scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
	scm_c_improper_memq to c_improper_memq, since it is not exported.

	(transform_bindings): Call scm_c_memq rather than
	scm_c_improper_memq.

	(SCM_CEVAL): Simplified handling of SCM_IM_IF forms.

	* test-suite/tests/syntax.test (exception:missing/extra-expr-syntax):
        New, introduced temporarily until all memoizers use the new way of
	error reporting.

	Adapted tests for 'if' to the new way of error reporting.
2003-10-12 12:58:51 +00:00
Dirk Herrmann
cc56ba8062 * libguile/eval.c (s_missing_expression, s_bad_variable): New static
identifiers.

	(scm_m_define): Use ASSERT_SYNTAX to signal syntax errors.  Prefer
	R5RS terminology for the naming of variables.  Be more specific
	about the kind of error that was detected.  Make sure file name,
	line number etc. are added to all freshly created expressions.
	Avoid unnecessary consing when creating the memoized code.

	* test-suite/tests/syntax.test (exception:missing-expr,
	exception:extra-expr): New.

	Adapted tests for 'begin' to the new way of error
	reporting.
2003-10-11 16:03:29 +00:00
Dirk Herrmann
609a8b86ae * libguile/eval.c (s_extra_expression, s_misplaced_else_clause,
s_bad_cond_clause, s_missing_recipient): New static identifiers.

	(s_extra_case_clause): Removed.

	(scm_m_case, scm_m_cond): If a clause appears after an else
	clause, report a misplaced else clause.

	(scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors.  Be more
	specific about the kind of error that was detected.  Handle bound
	'else and '=>.  Avoid unnecessary consing when creating the
	memoized code.

	(scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
	the syntactic keyword 'else and SCM_IM_ARROW to memoize the
	syntactic keyword '=>.

	* test-suite/tests/syntax.test (exception:misplaced-else-clause,
	exception:bad-cond-clause): New.

	(exception:bad/missing-clauses, exception:extra-case-clause):
	Removed.

	Adapted tests for 'case' and 'cond' to the new way of error
	reporting.

	The tests that check if cond is hygienic pass now.
2003-10-11 10:40:19 +00:00
Dirk Herrmann
58a2510b07 * libguile/eval.c (scm_m_case): Allow empty lists of case labels.
* test-suite/tests/syntax.test: Fixed and activated test of empty case
        label support.
2003-10-11 01:52:25 +00:00
Dirk Herrmann
2a6f7afe04 * libguile/tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
* libguile/print.c (scm_isymnames): Add names for the new memoizer
        codes.

	* libguile/eval.c (s_missing_clauses, s_bad_case_clause,
	s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
	literal_p): New static identifiers.

	(scm_m_case): Use ASSERT_SYNTAX to signal syntax errors.  Be more
	specific about the kind of error that was detected.  Check for
	duplicate case labels.  Handle bound 'else.  Avoid unnecessary
	consing when creating the memoized code.

	(scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
	the syntactic keyword 'else.

	* test-suite/tests/syntax.test (exception:bad-expression,
	exception:missing-clauses, exception:bad-case-clause,
	exception:extra-case-clause, exception:bad-case-labels): New.

	Added some tests and adapted tests for 'case' to the new way of
	error reporting.
2003-10-11 00:57:25 +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
Kevin Ryde
f33f103c95 New file. 2003-10-08 23:03:29 +00:00
Dirk Herrmann
d6e04e7c4a * lib.scm (exception:missing-expression): New.
* tests/dynamic-scope.test, tests/eval.test,
	tests/r5rs_pitfall.test, tests/srfi-17.test, tests/syncase.test:
	Wrap tests in module (test-suite test-<file-name without .test>),
	following a practice that was used on a couple of files already.

	* tests/dynamic-scope.test (exception:duplicate-binding,
	exception:bad-binding): New.

	* tests/dynamic-scope.test, tests/srfi-17.test, tests/syntax.test:
	Execute syntactically wrong tests using eval.  With the upcoming
	new memoizer this is necessary in order to postpone the syntax
	check to the actual evaluation of the syntactically wrong form.

	* tests/syntax.test: Added some test cases and modified one test
	case.
2003-10-07 22:00:05 +00:00
Kevin Ryde
ee6eedcde8 (call-with-output-string): Test proc closing port. 2003-10-02 00:17:16 +00:00
Kevin Ryde
930d3b37a8 Fix a couple of typos in:
New file.
2003-10-02 00:00:42 +00:00
Dirk Herrmann
8aa28a916c * guile-test: Wrapped in module (test-suite guile-test).
(main data-file-name test-file-name): Exported.

	((guile-user)::main): New function, wrapper for function
	(test-suite guile-test)::main.

	* tests/load.test: Wrapped in module (test-suite test-load).

	* tests/ports.test: Wrapped in module (test-suite test-ports).

	* tests/r4rs.test: Wrapped in module (test-suite test-r4rs).
	Added comments about the required structure of the file itself,
	since it is subject to some tests.  Removed some now unnecessary
	undefine operations.

	* tests/syntax.test: Wrapped in module (test-suite test-syntax)
2003-09-22 19:00:41 +00:00
Kevin Ryde
3e690887f5 New file. 2003-09-19 01:05:13 +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
813729f6fa Correction to a comment in:
(list-copy): New tests.
2003-08-30 00:02:44 +00:00
Kevin Ryde
1ec2dd6fd2 (lognot): Add tests. 2003-08-30 00:00:58 +00:00
Kevin Ryde
b052db6954 (list-copy): New tests. 2003-08-22 22:57:46 +00:00
Kevin Ryde
01dbf76f90 (date-week-number): Add tests. 2003-08-22 22:30:52 +00:00
Kevin Ryde
ef016629d0 (-): Exercise bignum - inum. 2003-08-22 01:23:14 +00:00
Kevin Ryde
cc08aafdaf (while): Exercise break and continue from
recursive nested loops.
2003-08-17 00:40:33 +00:00
Kevin Ryde
9f977dd883 Add a copyright year. 2003-08-12 21:39:56 +00:00
Kevin Ryde
2798ba71cd (while): New tests. 2003-08-12 21:39:30 +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
496660d01d New file. 2003-08-08 23:04:55 +00:00
Kevin Ryde
15d36a3438 (length+): New tests. 2003-07-28 23:51:41 +00:00
Kevin Ryde
68eb63f10f Check cond-expand srfi-34. 2003-07-28 23:47:47 +00:00
Kevin Ryde
c6e9db20c1 (concatenate, concatenate!): New tests. 2003-07-28 23:45:31 +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
9a029e414a 2003-07-14 Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
* tests/srfi-1.test (partition): Add tests.
2003-07-13 23:06:33 +00:00
Kevin Ryde
d40681ec4b (make-polar, magnitude): New tests. 2003-07-08 00:32:01 +00:00
Kevin Ryde
d53efb805b Remove a diagnostic accidentally left in initial checkin. 2003-07-08 00:14:44 +00:00
Kevin Ryde
72f1b979f6 (delete, delete!): Add more tests.
(delete-duplicates, delete-duplicates!): Add tests.
2003-07-08 00:13:06 +00:00
Kevin Ryde
14a6784cf1 (truncate, round, asinh, acosh, atanh): Add some tests. 2003-06-21 00:17:23 +00:00
Kevin Ryde
0d2cf5b556 New file, exercising putenv, setenv, unsetenv. 2003-06-19 01:42:28 +00:00
Kevin Ryde
5925aed0d6 New file, exercising parallel. 2003-06-19 01:41:20 +00:00
Kevin Ryde
0e87743aac New file. 2003-06-06 22:38:20 +00:00
Dirk Herrmann
f5c6ec2fb0 * test-suite/tests/chars.test: Fixed test comment. The bug that
this test detects was actually introduced by my patch from
	2003-05-31.

	* libguile/eval.c: Partially undid my patch from 2003-05-31.  This
	patch caused the segfault referenced in the previous changelog
	entry.
2003-06-04 23:50:13 +00:00
Dirk Herrmann
47dbd81e77 * test-suite/tests/chars.test: Added test, attempting to apply a
character.  This test will only pass if the other changes that are
	submitted together with this patch are also applied.

	* libguile/tags.h: Fixed comment about the immediate type code
	layout.

	* libguile/eval.c: Fixed handling of non-special instructions.
	Without this patch, guile will segfault on (#\0) and similar
	instructions.
2003-06-04 23:22:54 +00:00
Kevin Ryde
b7d22e033c (reading): Test bad # error message is formattable. 2003-06-04 16:37:30 +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
Dirk Herrmann
e757438dc9 * tests/pairs.test: Added. 2003-06-01 13:37:32 +00:00
Dirk Herrmann
7673cf6866 * tests/vectors.test: Added. 2003-06-01 11:17:30 +00:00
Dirk Herrmann
6d63297be2 * tests/guardians.test: Uses module (ice-9 weak-vector). 2003-06-01 11:13:04 +00:00
Kevin Ryde
501da40398 (max, min): Add tests involving NaNs. 2003-05-30 00:24:33 +00:00
Dirk Herrmann
42ad901d04 * benchmark-suite/lib.scm: Fix some typos in the documentation.
* doc/ref/scheme-compound.texi: Clarified that vectors need to
       be quoted.

       * doc/tutorial/guile-tut.texi: Fix example, where a vector
       constant is used without quoting.

       * ice-9/boot-9.scm (make-autoload-interface): Added missing
       quote around vector constant.

       * test-suite/tests/elisp.test: Added missing quote around vector
       constants.
2003-05-27 18:33:19 +00:00
Dirk Herrmann
ddd8f927d8 * libguile/eval.c (SCM_CEVAL): In case of an application, all checks
for a proper function object and the correct number of arguments are
	now performed in the application part of SCM_CEVAL.

	(scm_badformalsp):  Removed.

	* test-suite/tests/r5rs_pitfall.test: Test 2.1 now passes.
2003-05-25 07:50:23 +00:00
Kevin Ryde
adda36ed70 (=, <, max, min): Add tests of bignum/inf combinations. 2003-05-12 23:52:17 +00:00
Kevin Ryde
8ec84fe54e (delete, delete!): Test predicate call arg order. 2003-05-12 23:05:50 +00:00