[FIX][TEST] When (1063751680 < 1063751679) is true!
Boris Gaertner
Boris.Gaertner at gmx.net
Mon Feb 2 10:01:39 UTC 2004
Thnk you for that fix, Bert,
Attached you find a test case that conserves your findings
for coming generations of Squeakers :-)
Greetings, Boris
Bert Freudenberg <bert at impara.de> wrote:
> Am 01.02.2004 um 02:00 schrieb Peter William Lount:
> > I'm not quite sure what this bug is but it sure drove me crazy for
> > hours
> > trying to find it. Of course I assumed that
> >
> > (1063751680 < 1063751679)
> >
> > would be false, but I found a case where it's true! Yikes!
> >
> > Ok here is a code fragment which reproduces the problem. The start and
> > end
> > variables that I'm constructing are ip addresses or 32 bit integers.
> >
> > | aStart anEnd aRange anIndex aList |
> > "Specify the temporary variables so you can see them in the
> > debugger"
> > aStart := Integer byte1: 0 byte2: 140 byte3: 103 byte4: 63.
> > anEnd := Integer byte1: 255 byte2: 143 byte3: 103 byte4: 63.
> > "At this point the above produces two LargePositiveIntegers"
>
> Which is wrong - it is illegal for a LargeInteger to be less than
> SmallInteger maxVal. Here is a fix:
>
> "Change Set: intNewFix-bf
> Date: 2 February 2004
> Author: Bert Freudenberg
>
> Fixes a bug in Integer class>>byte1:byte2:byte3:byte4: reported by
> Peter William Lount"
>
> - Bert -
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestInteger-bg.1.cs
Type: application/octet-stream
Size: 3732 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040202/0b6ceeb7/TestInteger-bg.1.obj
More information about the Squeak-dev
mailing list
|