google / lisp-koans

Common Lisp Koans is a language learning exercise in the same vein as the ruby koans, python koans and others. It is a port of the prior koans with some modifications to highlight lisp-specific features. Structured as ordered groups of broken unit tests, the project guides the learner progressively through many Common Lisp language features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prefilled assert in "test-integers-can-get-really-big" (koans/type-checking.lsp) fails on x86 version of SBCL (Linux and Windows)

preetpalS opened this issue · comments

The assert (assert-true (typep 1234567890123456789 'fixnum)) fails on the X86 binary download available from http://sbcl.org/platform-table.html since most-positive-fixnum is equal to 536870911 in that version of SBCL. That hardcoded value would be better off being below 536870911 as the prefilled asserts should not fail (this is the only failing prefilled assert that I encountered while completing the Koans on the X86 Windows version of SBCL). Also the boundary between the fixnum and bignum types is already heavily emphasized in the following asserts in the test.

Yes, I ran into the same problem. I'm using Linux X86 version of SBCL 1.2.7
Evaluating most-positive-fixnum returns 16777215, so the prefilled assert
(assert-true (typep 1234567890123456789 'fixnum)) fails.

In result, the hardcoded value should be even less than 536870911

This issue probably doesn't matter too much since 32-bit processors are not relevant (and are probably going to get less and less relevant in the future) so I am going to close it. Plus it's probably a good learning exercise to encounter an error in the test suite itself for those who are using the 32-bit version of the software anyways.