|
From: | Paul Eggert |
Subject: | Re: Making 'eq' == 'eql' in bignum branch |
Date: | Mon, 20 Aug 2018 09:51:51 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Andy Moreton wrote:
The current codebase assumes that lisp bignum objects only exist for values outside fixnum range. Without fixnump how can tests check that values within fixnum range actually have a fixnum representation
Tests cannot possibly check that, because 'fixnump' itself might simply return t for any integer in fixnum range, even if the integer is internally represented as a bignum.
Besides, the current codebase is not actually assuming that Lisp bignum objects exist only for values outside fixnum range (the current codebase is not assuming that bignums exist at all, for that matter). What the current codebase is assuming is alluded to in the "Subject:" line of this email, i.e., it is assuming that eq is equivalent to eql on fixnums. And this assumption can be tested directly, by doing some computations and checking that eq works as expected when results are in fixnum range. The test code doesn't need fixnump or bignump to do this sort of test.
[Prev in Thread] | Current Thread | [Next in Thread] |