From d691df9cbfd121f5020c0c223ea23ce31659b34d Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sat, 4 Apr 2020 12:34:15 -0400 Subject: [PATCH] Fix error in test compilation --- Tests/base/NSURL/components.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Tests/base/NSURL/components.m b/Tests/base/NSURL/components.m index e10cdbc5b..3d683f4da 100644 --- a/Tests/base/NSURL/components.m +++ b/Tests/base/NSURL/components.m @@ -5,18 +5,19 @@ int main() { + NSURLComponents *components = nil; + START_SET("components"); - NSURLComponents *components = [NSURLComponents componentsWithURL:[NSURL URLWithString:@"https://user:password@some.host.com"] resolvingAgainstBaseURL:NO]; + components = [NSURLComponents componentsWithURL:[NSURL URLWithString:@"https://user:password@some.host.com"] resolvingAgainstBaseURL:NO]; [components setQueryItems: [NSArray arrayWithObjects: - [NSURLQueryItem queryItemWithName:@"lang" value:@"en"], - [NSURLQueryItem queryItemWithName:@"response_type" value:@"code"], - [NSURLQueryItem queryItemWithName:@"uri" value:[NSURL URLWithString:@"https://some.url.com/path?param1=one¶m2=two"].absoluteString], - nil]]; + [NSURLQueryItem queryItemWithName:@"lang" value:@"en"], + [NSURLQueryItem queryItemWithName:@"response_type" value:@"code"], + [NSURLQueryItem queryItemWithName:@"uri" value:[[NSURL URLWithString:@"https://some.url.com/path?param1=one¶m2=two"] absoluteString]], nil]]; // URL PASS([[components string] isEqualToString: - @"https://user:password@some.host.com/?lang=en&response_type=code&uri=https://some.url.com/path?param1%3Done%26param2%3Dtwo"], + @"https://user:password@some.host.com/?lang=en&response_type=code&uri=https://some.url.com/path?param1%3Done%26param2%3Dtwo"], "URL string is correct"); // NOTE: The slash behind the .com is strictly legal, but this is NOT what is produced by macOS. I would like to correct this in a // future release.