* Tests/base/NSLocale/general.m: Mark more tests that depend on

locale setting as hopes.
* Tests/base/NSXMLParser/parse.m: Mark stream test as hopeful as
this isn't implemented at the moment.
* Tests/base/NSURL/basic.m: Use PASS_EQUAL in the downlaod test
to get the actual http status reported.
This commit is contained in:
fredkiefer 2020-05-09 15:46:32 +02:00
parent f4c5c519c2
commit 6c7defba24
4 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2020-05-09 Fred Kiefer <fredkiefer@gmx.de>
* Tests/base/NSLocale/general.m: Mark more tests that depend on
locale setting as hopes.
* Tests/base/NSXMLParser/parse.m: Mark stream test as hopeful as
this isn't implemented at the moment.
* Tests/base/NSURL/basic.m: Use PASS_EQUAL in the downlaod test
to get the actual http status reported.
2020-05-08 Fred Kiefer <fredkiefer@gmx.de>
* Source/NSXMLParser.m: Fix small bug in last commit that broke

View file

@ -22,6 +22,7 @@ int main(void)
// These tests don't really work all that well. I need to come up with
// something better. Most of the ones that fail are because nil is returned.
testHopeful = YES;
locale = [[NSLocale alloc] initWithLocaleIdentifier: @"es_ES_PREEURO"];
PASS_EQUAL([locale objectForKey: NSLocaleIdentifier],
@"es_ES@currency=ESP",
@ -64,7 +65,6 @@ int main(void)
"NSLocaleCurrencyCode key returns 'ESP'");
PASS_EQUAL([locale objectForKey: NSLocaleCollatorIdentifier],
@"es_ES@currency=ESP", "NSLocaleCollatorIdentifier for Spain");
testHopeful = YES;
PASS_EQUAL([locale objectForKey: NSLocaleGroupingSeparator],
@".",
"NSLocaleGroupingSeparator key returns '.'");

View file

@ -59,7 +59,7 @@ int main()
url = [NSURL URLWithString: @"http://www.w3.org/silly-file-name"];
data = [url resourceDataUsingCache: NO];
num = [url propertyForKey: NSHTTPPropertyStatusCodeKey];
PASS([num isKindOfClass: [NSNumber class]] && [num intValue] == 404,
PASS_EQUAL(num, [NSNumber numberWithInt: 404],
"Status of load is 404 for www.w3.org/silly-file-name");
str = [url scheme];
PASS([str isEqual: @"http"],

View file

@ -358,9 +358,11 @@ int main()
PASS((testParseStream(stream, result, YES)),
"parse stream (strict): %s", [xmlName UTF8String])
testHopeful = YES;
stream = [NSInputStream inputStreamWithFileAtPath:xmlPath];
PASS((testParseStream(stream, result, NO)),
"parse stream (sloppy): %s", [xmlName UTF8String])
testHopeful = NO;
}
}