Commit graph

175 commits

Author SHA1 Message Date
yorickhardy
2b0f0601a6
Raise errors and objects with different tags (#557)
* tests/base.scm: add two tests for issue #556

The two tests are adapted from issue #556 (originally from r7rs).
The tests currently fail because errors and raised objects are
treated in the same way.

* Use different tags for raised objects and raised errors

The behaviour for raising an error (error message irritants) and
objects (raise object) are different in r7rs. So tag error objects
differently, and adjust the raised object handling to handle
the raised object instead of a list containing the raised object.

This should resolve issue #556.

* runtime: use the correct string length for comparison

Fix for the pull request adressing issue #556.

* runtime: distinguish exceptions and errors in default handler

* repl: use error-object? to decide whether an error or an exception was raised

This makes error messages a bit more informative.  Also, if error objects become
a distinct type, then the repl implementation will continue to be correct. The
(deleted) second cond clause seemed to be bit redundant - I am not sure what the
original intent was.

* tests/base.scm: revert accidental deletion of else clause

* Display exceptions as errors for consistency
2025-02-23 16:23:16 -05:00
Justin Ethier
2d833cd6c1
552 cond expand no match (#554)
* Issue #552 - Error if no match cond-expand clause

* Issue #552 - Document change to cond-expand
2025-01-16 22:31:08 -05:00
Justin Ethier
65fa16cce7 Issue #537 - Add tests 2024-05-21 18:58:49 -07:00
Justin Ethier
0ea2457db6 Issue #530 - Adding more tests 2024-03-14 18:57:09 -07:00
Justin Ethier
512e962a9b Add more sqrt tests 2024-03-12 19:22:09 -07:00
Justin Ethier
fa6213b907 Issue #530 - First cut at improving sqrt
Improving sqrt to properly handle negative parameter values
2024-03-11 19:19:12 -07:00
Justin Ethier
17cce16139 Comment out so we don't keep breaking bootstrap
These tests fail on mac and we can't use them in the bootstrap repo
2024-02-13 18:03:03 -08:00
Yorick Hardy
7d8f70fb07 add more tests for rounding
r7rs requires (round x) to round to even when x is halfway between
two integers, while C requires round(x) to round away from zero.
2024-02-01 22:23:16 +02:00
Justin Ethier
749d4b6a0c Issue #519 - Properly handle doubles in remainder 2024-01-07 19:29:20 -08:00
Justin Ethier
034d26a18a Initial round of tests 2024-01-07 13:10:38 -08:00
Justin Ethier
ffcbca6c3e Issue #519 - Stage new test cases 2024-01-07 07:23:59 -08:00
Justin Ethier
1d775c5a75 Add cond-expand for memory streams 2023-12-17 19:11:55 -08:00
Justin Ethier
08bd333701 Cleanup 2023-11-27 18:59:42 -08:00
Justin Ethier
705e70d12a Issue #513 - Add test case 2023-11-20 18:37:34 -08:00
Justin Ethier
7dc1f9e179 Issue #510 - Exact support for complex nums
Allow `exact` to properly handle complex numbers
2023-09-11 19:02:28 -07:00
Justin Ethier
e8ba3f1c1b Issue #510 - Exact conversion of large doubles
Allow `exact` to convert large double values to bignums.
2023-09-11 18:24:33 -07:00
Justin Ethier
46e7e193df Issue #510 - Added test cases 2023-09-05 17:41:36 -07:00
Justin Ethier
ad1ac3a135 Issue #490 - Proper assv and memv implementations
Both were previously implemented in terms of `assq` and `memq`, respectively.
2022-07-24 10:56:41 -04:00
Justin Ethier
265e34ee08 Add header comment 2022-06-26 18:52:16 -04:00
Justin Ethier
bcecdd912a Issue #365 - Add new test file 2022-06-26 18:51:38 -04:00
Justin Ethier
86b1169cf9 Conditionally expand memory stream tests 2022-05-28 17:41:19 -07:00
Justin Ethier
702451541a Add formal test cases 2022-05-27 16:21:08 -04:00
Justin Ethier
b69b65756b Added more unit tests 2021-07-30 17:11:43 -04:00
Justin Ethier
362317108d Reorganize code 2021-07-26 19:18:31 -07:00
Justin Ethier
176e674026 Issue #465 - Added unit tests 2021-07-26 19:16:37 -07:00
Justin Ethier
a2a518fd02 Issue #404 - Added unit tests 2021-07-26 19:05:24 -07:00
Justin Ethier
61cc07f99e Issue #433 - Added unit tests 2021-07-26 19:02:23 -07:00
Justin Ethier
2fe006f22a Issue #462 - Added unit tests 2021-07-26 19:00:04 -07:00
Justin Ethier
9356833ef6 Issue #379 - Added unit tests 2021-07-26 18:55:17 -07:00
Justin Ethier
197499aea4 Add test module for (scheme base) 2021-07-26 13:36:40 -04:00
Justin Ethier
ed799e4bbb Issue #279 - Add unit tests 2021-07-26 13:27:22 -04:00
Justin Ethier
a0216a8545 Issue #404 - Added unit tests 2021-07-19 17:12:22 -04:00
Justin Ethier
11ef71a2c9 Issue #414 - Add tests for SRFI 128 / 162 2020-09-30 13:06:36 -04:00
Justin Ethier
23f0d928ea Remove temporary file 2020-09-17 17:30:02 -04:00
Justin Ethier
457ca32279 Issue #407 - Modified the reader to handle escaped intraline whitespace properly, per R7RS. 2020-09-16 23:05:02 -04:00
Justin Ethier
e2b2d9b21d Issue #398 - Added test cases 2020-08-01 18:37:56 -04:00
Arthur Maciel
1a76af8d9e Removed all traces of array-list from core 2020-05-26 21:09:14 -03:00
Justin Ethier
22a68d1097 Fix unit tests 2020-05-21 18:39:48 -04:00
Justin Ethier
3dc451d016 eqv? behavior per R7RS 2020-05-21 18:12:54 -04:00
Justin Ethier
12489dcea5 Issue #361 - Added tests 2020-03-05 20:53:35 -05:00
Justin Ethier
e211e3f64d Issue #339 - Fix fast path in make-string
We need to ensure the code point buffer only contains a single byte in order to use the fast path for string creation. For example if there is one code point that is 2 bytes large we need to use the slow path.
2019-09-23 13:28:52 -04:00
Justin Ethier
848e3805b9 Remove dead code 2019-07-02 13:27:00 -04:00
Justin Ethier
17883cbf7c Relocated file 2019-07-02 13:26:50 -04:00
Justin Ethier
1a1f707a73 Relocated test library 2019-06-19 18:29:42 -04:00
Justin Ethier
b3e9c31d41 Relocated library 2019-06-19 13:18:48 -04:00
Justin Ethier
7fc911069d Fix to use mutable objects 2019-05-14 13:07:16 -04:00
Justin Ethier
0a0f51ada5 Relocated test files 2019-02-15 17:56:26 -05:00
Justin Ethier
7bbd70df22 Relocate test file 2019-01-16 10:05:58 -05:00
Justin Ethier
f29b482334 Relocated file 2018-11-09 17:04:51 -05:00
Justin Ethier
80ac3ef86f Added notes 2018-10-05 17:32:28 -04:00