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

35 commits

Author SHA1 Message Date
Andy Wingo
ce09ee1989 add tree-il->glil compilation test suite
* module/language/tree-il.scm (parse-tree-il): Fix a number of bugs.
  (unparse-tree-il): Apply takes rest args now.

* module/language/tree-il/analyze.scm (analyze-lexicals)
  (analyze-lexicals): Heap vars shouldn't increment the number of locals.

* module/language/tree-il/optimize.scm (resolve-primitives!): Don't
  resolve public refs to primitives, not at the moment anyway.

* test-suite/Makefile.am (SCM_TESTS): Add tree-il test.

* test-suite/lib.scm (pass-if, expect-fail, pass-if-exception)
  (expect-fail-exception): Rewrite as syntax-rules macros. In a very
  amusing turn of events, it turns out that bindings introduced by
  hygienic macros are not visible inside expansions produced by
  defmacros. This seems to be expected, so go ahead and work around the
  problem.

* test-suite/tests/srfi-31.test ("rec special form"): Expand in eval.

* test-suite/tests/syntax.test ("begin"): Do some more expanding in eval,
  though all is not yet well.

* test-suite/tests/tree-il.test: New test suite, for tree-il->glil
  compilation.
2009-05-18 23:45:35 +02:00
Neil Jerram
2d04022ce2 * tests/continuations.test ("continuations"): Use
with-debugging-evaluator.

* lib.scm (with-debugging-evaluator*, with-debugging-evaluator):
New utilities.

* standalone/test-use-srfi: Use -q to avoid picking up the user's
~/.guile file.

* tests/eval.test (promises)[unmemoizing a promise]: New test.
2007-10-21 20:45:45 +00:00
Ludovic Courtès
a1ef740636 Changes from arch/CVS synchronization 2007-06-07 08:36:13 +00:00
Kevin Ryde
970aac161b (exception:string-contains-nul): New exception pattern. 2007-01-18 23:10:13 +00:00
Ludovic Courtès
d15ad007c9 Changes from arch/CVS synchronization 2006-06-13 07:48:42 +00:00
Kevin Ryde
6e7d5622ee merge from 1.8 branch 2006-04-16 23:37:40 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
a47d845fd4 (exception:out-of-range, exception:wrong-type-arg):
Accept new wording.
2004-09-23 17:57:55 +00:00
Marius Vollmer
0ac467456b * lib.scm (exception:used-before-define): New.
* tests/syntax.test ("letrec"): Use it.
2004-08-23 10:48:51 +00:00
Kevin Ryde
0825ae0b5b (exception:numerical-overflow): New define. 2004-05-29 22:09:52 +00:00
Dirk Herrmann
d6754c2398 * libguile/eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
scm_m_expand_body, check_bindings): Extracted syntax checking of
	bindings to new static function check_bindings.

	(scm_m_let, memoize_named_let): Extracted handling of named let to
	new static function memoize_named_let.

	(transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
	ASSERT_SYNTAX to signal syntax errors.  Be more specific about the
	kind of error that was detected.  Avoid use of SCM_CDRLOC.  Avoid
	unnecessary consing when creating the memoized code.

	* test-suite/lib.scm (exception:bad-variable): New.

	* test-suite/tests/syntax.test (exception:bad-binding,
	exception:duplicate-binding): New.

	(exception:duplicate-bindings): Removed.

	Adapted tests for 'let', 'let*' and 'letrec' to the new way of
	error reporting.
2003-10-18 12:07:39 +00:00
Dirk Herrmann
e6729603c0 * libguile/eval.c (s_bad_expression, syntax_error_key, syntax_error,
ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.

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

	* test-suite/lib.scm (run-test-exception): Handle syntax errors.
2003-10-10 21:49:27 +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
Dirk Herrmann
e46083d5c5 * lib.scm: Documented the short form for pass-if and expect-fail.
(pass-if, expect-fail): Simplified.
2003-05-30 10:35:05 +00:00
Rob Browning
b4690a661e * lib.scm (pass-if): allow really simple tests where the test code
is also the name like (pass-if (even? 2)).
(expect-fail): allow really simple tests where the test code is
also the test name like (expect-fail (even? 2)).
2003-03-25 02:21:03 +00:00
Mikael Djurfeldt
1a179b03b0 * lib.scm: Move module the system directives `export',
`export-syntax', `re-export' and `re-export-syntax' into the
  `define-module' form.  This is the recommended way of exporting
  bindings.

* srfi-2.scm, srfi-4.scm, srfi-8.scm, srfi-9.scm, srfi-10.scm,
srfi-11.scm, srfi-14.scm, srfi-16.scm: Move module the system
directives `export', `export-syntax', `re-export' and
`re-export-syntax' into the `define-module' form.  This is the
recommended way of exporting bindings.

* goops.scm, goops/active-slot.scm, goops/compile.scm,
goops/composite-slot.scm, goops/describe.scm, goops/dispatch.scm,
goops/old-define-method.scm, goops/save.scm, goops/util.scm: Move
module the system directives `export', `export-syntax',
`re-export' and `re-export-syntax' into the `define-module' form.
This is the recommended way of exporting bindings.

* slib.scm (array-indexes): New procedure.
(*features*): Extend.  (Probably some of these options should be
set elsewhere.)  (Thanks to Aubrey Jaffer.)

* and-let-star-compat.scm, and-let-star.scm, calling.scm,
  channel.scm, common-list.scm, debug.scm, debugger.scm,
  expect.scm, hcons.scm, lineio.scm, ls.scm, mapping.scm,
  null.scm, optargs.scm, poe.scm, popen.scm, pretty-print.scm,
  q.scm, r5rs.scm, rdelim.scm, regex.scm, runq.scm, safe-r5rs.scm,
  safe.scm, session.scm, slib.scm, streams.scm, string-fun.scm,
  syncase.scm, threads.scm: Move module the system directives
  `export', `export-syntax', `re-export' and `re-export-syntax'
  into the `define-module' form.  This is the recommended way of
  exporting bindings.
2001-10-21 09:49:19 +00:00
Thien-Thi Nguyen
bba2d1908a (run-test-exception): Add special handling for
`error'-generated exceptions, which pass key
`misc-error' and leave messages unformatted.
2001-08-01 09:57:01 +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
8bc4547c4e * Preserve the original error's stack for re-throwing. 2001-03-05 11:05:02 +00:00
Dirk Herrmann
08c608e10a * extracted the tests from exceptions.test into eval.test and syntax.test.
* added a few test cases.
2001-03-02 01:38:01 +00:00
Dirk Herrmann
88f9ab70d0 * Removed old system to check for exceptions. 2001-02-28 11:48:18 +00:00
Dirk Herrmann
6b4113afc5 * Provide and use new convenience macros to test for exceptions. 2001-02-28 11:25:40 +00:00
Dirk Herrmann
5c96bc39a4 * Make sure that tests return a boolean value. 2001-02-28 08:41:06 +00:00
Dirk Herrmann
ac6849ffee * Cleaned up export list. 2001-02-27 11:10:07 +00:00
Dirk Herrmann
efb07c899c * Fixed things that I had broken with the last patch :-( 2001-01-26 16:49:28 +00:00
Dirk Herrmann
6ad9007abf * lib.scm (pass-if, expect-fail): Generalized.
* * tests/eval.test:  Fixed documentation test.
2000-08-21 08:57:11 +00:00
Dirk Herrmann
57e7f27001 Adopted a couple of nice ideas from Greg. 2000-05-08 17:42:03 +00:00
Jim Blandy
05c4ba0055 * lib.scm: Doc fixes. 2000-03-22 21:18:57 +00:00
Jim Blandy
5f2125be10 Doc fix. 1999-09-20 23:57:44 +00:00
Jim Blandy
69c74140dd * lib.scm (signals-error?, signals-error?*): New macro and function.
* tests/reader.test: Use them.
1999-09-11 18:46:32 +00:00
Jim Blandy
474d9afb8b * lib.scm: Import (test-suite paths).
(data-file): New exported function.
1999-06-15 08:39:39 +00:00
Jim Blandy
5157b4a518 * lib.scm (print-counts): XFAILS are "expected failures", not
"unexpected failures."
1999-06-09 09:41:54 +00:00
Jim Blandy
29055e0647 * lib.scm (full-reporter): The test name is the cadr of the
result, not the cdr.  I'm not macho enough to handle run-time
typechecking.
1999-06-09 08:57:23 +00:00
Jim Blandy
087dab1cf6 Provide a default reporter, so that results don't just go into the bit
bucket if you use the test suite functions without a driver script.
(default-reporter): New variable.
(report): Send results to default-reporter if there are no registered
reporters.
(full-reporter): New function.
(user-reporter): Re-implemented in terms of full-reporter.
1999-05-31 21:27:20 +00:00
Jim Blandy
000ee07fc6 Initial checkin of the Guile test suite. 1999-05-29 14:22:24 +00:00