How to create a SqueakSource image?
Frank Shearar
frank.shearar at angband.za.org
Wed Feb 8 11:48:36 UTC 2006
This sounds like http://bugs.impara.de/view.php?id=2229 which looks like it
was added to 3.9a-6707.
IntegerTest>>testPrintPaddedWith does exercise the code, although it's fair
to say that this is hardly obvious. Integer>>printOn:base:showRadix:'s sole
sender is Integer>>printPaddedWith:to:base:, but perhaps I should write a
test suite for #printOn:base:showRadix.
I completely agree that (in 6706) there's horrible special-casing for base
10: I wrote some tests detailing what I _thought_ should happen, and made
only the smallest changes I could to make the tests pass. In particular, I
made it work; I didn't make it right.
frank
----- Original Message -----
From: "Andreas Raab" <andreas.raab at gmx.de>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Tuesday, February 07, 2006 11:52 PM
Subject: Re: How to create a SqueakSource image?
> Actually #printOn:base:showRadix: will fail for any showRadix: false
> unless base is 10. Sounds weird? Yeah. Here are examples:
>
> 100 printOn: Transcript base: 8 showRadix: false "->fails"
> 100 printOn: Transcript base: 10 showRadix: false "->succeeds"
> 100 printOn: Transcript base: 16 showRadix: false "->fails"
>
> Looks like #printStringRadix: is supposed to return a radix whenever
> invoked but doesn't. Note how it is actually special-casing radix 10 -
> it looks like it's expecting #printStringBase: to add the "16r" prefix
> which apparently #printStringBase: doesn't (or rather "no longer") do.
>
> BTW, this is a classic screw-up that tests would have found in no time.
> Where are they when you need 'em?
>
> Cheers,
> - Andreas
>
> Wilkes Joiner wrote:
> > image 3.8 6665
> > it fails on the default color on red 54.
> >
> > On 2/7/06, Philippe Marschall <philippe.marschall at gmail.com> wrote:
> >> 2006/2/7, Wilkes Joiner <wilkesjoiner at gmail.com>:
> >>> That seems to be part of the problem. The error is being generated by
> >>> Color>>hex from
> >>> Integer>>printOn: base: showRadix:
> >>>
> >>> "radix indicator not found."
> >> Can you go up the stack and see for what number this fails?
> >>
> >> What an Image (version) do you have?
> >>
> >>
> >
> >
>
>
>
More information about the Squeak-dev
mailing list
|