1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-19 09:38:28 +03:00
Commit Graph

18 Commits

Author SHA1 Message Date
Garklein
1c76e857f8 additional test 2021-08-04 12:58:52 -05:00
Nicolas Boulenguez
931971e047 Move step9 test of map as exceptions from deferrable to optional
Self-hosting is not requiring this anymore.
2021-07-11 17:40:43 -06:00
Nicolas Boulenguez
7a45dc5851 Add intermediate test for env/fn interaction
It should pass on existing implementations because it is a
prerequisite for an existing test, but small independent tests are
easyer to debug on new implementations.
2021-07-11 17:38:14 -06:00
Nicolas Boulenguez
894b24d892 haskell: fix and optional-test order of assignments in let* 2021-07-11 17:38:14 -06:00
mmcgill
a54987cde7 [java-truffle] benchmarking and write-up 2021-05-31 10:28:04 -05:00
Joel Martin
17dc372dc4 Merge remote-tracking branch 'jamesroutley/patch-1' 2021-04-21 16:15:20 -05:00
Nicolas Boulenguez
0ee1a51777 New SWI-prolog implementation
with, in stepA_mal.mal, a new way to pass all test and break
self-hosting nevertheless.
2021-04-19 09:53:22 -05:00
Ben Harris
f1c1cde289 Test that (= [] (vector)) and (= {} (hash-map)) are both true
The latter suggested by @dubek.  The first an obvious extension.
2021-04-19 09:07:24 -05:00
Ben Harris
b012e8f8e6 Test equality of other kinds of empty list
In #513, @dubek noted two additional ways to make empty lists in fantom
that compare different from an empty list made by evaluating an empty
list.  This adds tests for those, along with another two that might fail
similarly (but don't in fantom).
2021-04-19 09:07:24 -05:00
Ben Harris
c88a57fb3f step 4: Test that (= (list) ()) is true
In APL, empty arrays have type, and the ≡ function pays attention to
that, so if you're not careful empty lists produced by different means
compare different.  This test detects that by comparing an empty list
produced by "list" with one produced by evaluating an empty list.

My bug was found by a deferrable step 4 test, but the bug should be
non-deferrable.
2021-04-19 08:34:42 -05:00
Dov Murik
f8c1c83ffe fantom: Fix "!" handling
Modify Java options to disable jLine handling of expand events (which
start with "!").  This will require re-building of the fantom docker
image.

The test that failed is now moved to the mandatory section of step1
tests.
2021-04-18 15:25:49 -05:00
James 明良 Routley
9c7d994be1
Add missing expected result for test case
Heya - I might be wrong, but I think this line needs to be added - it's the expected output from evaluating the line above - `1; &()*+,-./:;<=>?@[]^_{|}~`
2021-01-03 22:56:41 +00:00
Nicolas Boulenguez
fbfe6784d2 Change quasiquote algorithm
- Add a `vec` built-in function in step7 so that `quasiquote` does not
  require `apply` from step9.
- Introduce quasiquoteexpand special in order to help debugging step7.
  This may also prepare newcomers to understand step8.
- Add soft tests.
- Do not quote numbers, strings and so on.

Should ideally have been in separate commits:
- elisp: simplify and fix (keyword :k)
- factor: fix copy/paste error in let*/step7, simplify eval-ast.
- guile: improve list/vector types
- haskell: revert evaluation during quasiquote
- logo, make: cosmetic issues
2020-08-11 01:01:56 +02:00
Ben Harris
a8e337b291 Step 2: Test empty vectors and hash-maps
An empty vector or hash-map should evaluate to itself, but I reached
the test of (empty? []) in step 4 before I discovered that I'd got []
evaluating to 0.  Add tests for both cases to step 2.
2020-05-28 11:28:38 +01:00
Joel Martin
73cd4374ba
Merge pull request #508 from bjh21/bjh21-throwtests
Add tests for nested exception handlers
2020-05-21 18:07:15 -05:00
Ben Harris
5fb74d336f Add tests for nested exception handlers
When implementing exceptions on top of longjmp() or similar, it's
necessary to make sure that exception handlers get properly restored
after the try* clause, and none of the existing step 9 tests covered
this.

There are two cases covered here: throwing an exception after a
successful try*, and throwing and exception from within a catch*.  In
both cases we make sure that an outer catch* does its job.
2020-05-19 10:28:21 +01:00
Ben Harris
d98d5c3b09 Step 6: Test read-string of a single atom at the end of input
All of the other read-string tests test forms whose end can be detected
before the end of the input string, either because they're naturally
self-terminating (lists, strings) or because there's white space after
them.  All of the uses of the reader from the REPL are similarly likely
to have input with a newline or similar at the end.

My BCPL implementation turned out to read one character past the end of
the input when the input ended inside an atom, and to incorporate that
one byte into the output.  The consequences of a buffer over-read are a
little unpredictable, so I've just written a test that was good enough
to catch the bug for me.
2020-05-10 14:30:09 +01:00
Joel Martin
8a19f60386 Move implementations into impls/ dir
- Reorder README to have implementation list after "learning tool"
  bullet.

- This also moves tests/ and libs/ into impls. It would be preferrable
  to have these directories at the top level.  However, this causes
  difficulties with the wasm implementations which need pre-open
  directories and have trouble with paths starting with "../../". So
  in lieu of that, symlink those directories to the top-level.

- Move the run_argv_test.sh script into the tests directory for
  general hygiene.
2020-02-10 23:50:16 -06:00