* Tests/base/NSNumberFormatter/basic10_4.m: Avoid test failure on

big-endian platforms by converting unichar to an NSString.
This commit is contained in:
fredkiefer 2018-05-18 15:00:06 +02:00
parent f5684496a2
commit 09da1e6894
2 changed files with 9 additions and 3 deletions

View file

@ -1,4 +1,9 @@
2018-04-10 Fred Kiefer <fredkiefer@gmx.de>
2018-05-17 Yavor Doganov <yavor@gnu.org>
* Tests/base/NSNumberFormatter/basic10_4.m: Avoid test failure on
big-endian platforms by converting unichar to an NSString.
2018-05-10 Fred Kiefer <fredkiefer@gmx.de>
* Tools/pl2link.m (main): Don't write deprecated fields to desktop
link file.

View file

@ -58,7 +58,8 @@ int main()
START_SET("NSLocale")
NSLocale *sys;
NSLocale *en;
unichar spc[1] = {0x00a0};
const unichar uspc[1] = {0x00a0};
NSString *spc = [NSString stringWithCharacters: uspc length: 1];
if (!NSLOCALE_SUPPORTED)
SKIP("NSLocale not supported\nThe ICU library was not available when GNUstep-base was built")
@ -159,7 +160,7 @@ int main()
num = [[[NSNumber alloc] initWithFloat: -1234.56] autorelease];
str = [fmt stringFromNumber: num];
PASS(([str isEqual: @"(R$1.235)"] || [str isEqual: @"_R$1.235"]
|| [str isEqual: [NSString stringWithFormat: @"_R$%s%@",
|| [str isEqual: [NSString stringWithFormat: @"_R$%@%@",
spc, @"1.235"]]),
"negativeFormat used for -ve number");