New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failure with SBCL 2.4.2 #16
Comments
That's a known failure. Nothing is wrong. The failing test case validates that the lisp implementation calls This expectation is based on the Gray proposal wording:
All lisp implementations fail this. https://cl-test-grid.common-lisp.dev/library/trivial-gray-streams.html PS. In your script the |
Maybe the failure could be dealt with in the test's body then so the test passes as OK? I need to distinguish actually failing tests and I don't really want to make an exception for this one because it could be failing for some other reason. |
I also don't quite get it. Are these tests testing the CL implementation or this library? |
I've changed the code to
But it still feels a bit weird. |
Test suite can include this information. The test will not be passing OK, but it could be marked as a known failure (many test frameworks have a concept of known failures). For example it could be a I can't promise I will add this very quickly. Especially that you already have a solution for your scripts.
The tests validate that tirival-gray-streams works as a portability layer. That if someone defines a stream class that implements, say, |
So I "fixed" it in the template by checking that it's the only test that fails
It's still not a perfect solution because of said reason that the test might be failing for other reasons but it's a step forward :) I'm closing the issue.
Ah, OK, I was missing the re-export semantics. So basically to test trivial-gray-streams own code would require an implementation not supporting any gray streams? |
No, trivial-gray-streams only work for implementations with gray streams. There is a little area where trival-gray-streams needs some code code. To support 3 functions that can not be just re-exported: stream-read-sequence, stream-write-sequence, file-position. These functions are absent in the Gray proposal (I guess because the Common Lisp the Language book does not have cl:read-sequence, cl:write-sequence, cl:file-position), and in result Lisp implementations disagree on naming and parameters for these functions. For example old CLISP had gray:stream-read-byte-sequence, gray:stream-read-char-sequence, CCL has ccl:stream-read-vector, ccl:stream-read-list. So trivial-gray-steams unifies them by defining its own generic functions stream-read-sequence, stream-write-sequence, file-position. Then creates methods for implementation specific functions (like ccl:stream-read-vector), which call the unified versions (like trivial-gray-streams:stream-read-sequence). application -> cl:read-sequcence -> ccl:stream-read-vector -> trivial-gray-streams:stream-read-sequence. For the implementation specific methods be applicable to all user-defined stream classes, based on trivial-gray-streams, we need to mirror all Gray class hierarchy - define our own classes inherited from implementation specific Gray classes, instead of simply re-exporting the implementation classes. All this support for the 3 functions is implemented in the streams.lisp. |
I run the tests as follows:
and the output is
Could you help me figure out what's going wrong?
The text was updated successfully, but these errors were encountered: