Ouch, looks like something else entirely:

107           [fmt setNumberStyle: NSNumberFormatterPercentStyle];
(gdb)
108           testHopeful = YES;
(gdb)
109           PASS_EQUAL([fmt stringFromNumber: num], @"_123,443##",
(gdb) po num
-1234.43
(gdb) po fmt
<NSNumberFormatter: 0x8f4cb0>
(gdb) s
objc_msg_lookup (receiver=0x0, selector=0x612390) at sendmsg2.c:330
330     {
Current language:  auto; currently c
(gdb) bt
#0  objc_msg_lookup (receiver=0x0, selector=0x612390) at sendmsg2.c:330
#1  0x000000000040afd9 in main () at basic10_4.m:109
(gdb) s
331             if (nil == receiver) { return (IMP)nil_method; }

Looks like the runtime does not find the string formatters methods, therefore garbage is returned.
I am using the GNUstep runtime from SVN trunk.

TOM


Quoting Stefan Bidi <[email protected]>:

I'm not really sure.  I was hoping this test would return NaN as well.  Try
this other test.  Before, I used NULL (default locale) in the tests and now
it explicitly chooses "en", same as the GNUstep tests.  I'm hoping libicu
will return NaN this time.

On Sun, Mar 6, 2011 at 11:57 AM, <[email protected]> wrote:

Hi,

icicle@nordpol-laptop:~/Desktop/ICUtest$ gcc `icu-config --cflags`
`icu-config --ldflags` -licuio -o test test_unum.c
test_unum.c:6: Warnung: Rückgabetyp von »main« ist nicht »int«
icicle@nordpol-laptop:~/Desktop/ICUtest$ ./test
1.234,560000 = 1234,56
1.234 = 1234


Could it be a Locale issue, since my Ubuntu uses a german one
(LANG="de_DE.UTF-8")? As I did a clean install of GNUstep today I did not
set a time zone or language yet, maybe that's an issue.

TOM


Quoting Stefan Bidi <[email protected]>:

 Hmm... The results you're getting are quite strange.  The only time these
method returns NaN is if the object is not a NSNumber.  If it is, than we
just send it through icu to get converted.  The problem here is that
either
libicu is returning 'NaN' for these values or NSNumber is return nil.

Could you run and report the output of the attach test?  I just want to
make
sure libicu is doing it's thing correctly.  To build it: gcc `icu-config
--ldflags` -licuio test_unum.c

Thanks


On Sun, Mar 6, 2011 at 7:02 AM, <[email protected]> wrote:


Hi!

Test results, lots of NSNumberFormatter fails. I am using ICU 4.6.

Cheers,
TOM


_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev








_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to