Comments (4)
Root issue is that the framework bundles the tests into a hash and then iterates over that hash to get test names:
Line 716 in 35a5200
Common Lisp hyperspec clairifies that the order of evaluation in common lisp for looping over hashes is undefined (http://www.lispworks.com/documentation/HyperSpec/Body/06_abaf.htm).
It appears that (at least on my machine configuration / common lisp version), replacing the run-koans
method in lisp-unit.lsp
with the following ameliorates the issue in practice, but this solution is itself implementation-dependent, and a real solution would involve reworking how the lisp-unit.lsp
package manages the list of tests to treat it as a list, not a hashtable.
(defun run-koans (package)
"Run the list of test thunks in the package. Stopping
at a failure or incomplete, with more helpful messaging"
(let ((tests (loop
with results = nil
for test-name being each hash-key in (package-table package)
using (hash-value unit-test)
do (push `(,test-name . ,unit-test) results)
finally (return results))))
(loop
with koan-results = nil
for (test-name . unit-test) in tests
if unit-test do
(push (list test-name (koan-result (code unit-test))) koan-results)
else do
(push (list test-name :missing) koan-results)
until (and (not *proceed-after-failure*) (any-non-pass-p koan-results))
finally (return koan-results))))
from lisp-koans.
Yes
from lisp-koans.
This happens on SBCL too, however not for all koans. It does happen in assert.lsp though.
from lisp-koans.
I'm hitting this as well with CLISP. It's frustrating writing solutions to each exercise in top-down order and then validating them in bottom-up order.
from lisp-koans.
Related Issues (20)
- iterations.lsp test-dolist hates multiple strings in let (clisp) HOT 1
- Prefilled assert in "test-integers-can-get-really-big" (koans/type-checking.lsp) fails on x64 version of CLISP (Linux)
- We should have completed koans in a separate folder HOT 1
- DEFUN SIGN-OF is beyond repair
- Thread koans: possible replacement for SEMAPHORE-COUNT HOT 6
- Solve threading koans
- condition-handlers always error HOT 4
- scoring-project.lisp difficulty jump
- abcl has __ symbol defined in :cl-user HOT 1
- [suggestion] use bordeaux-threads for threading koans HOT 2
- Prefilled assert in "test-integers-can-get-really-big" (koans/type-checking.lsp) fails on x86 version of SBCL (Linux and Windows) HOT 2
- no function named "assert-ture" HOT 2
- Supposed mistake in koan special-forms.lsp HOT 1
- File extension is usually .lisp
- Indentation is off in almost all files
- Error in vectors.lsp HOT 3
- typo in koans/type-checking.lsp HOT 1
- how to run this HOT 7
- Can I port some tests over to Racket koans under different license? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lisp-koans.