Fix NSJSONSerialization test on Windows.

"small" is defined as a macro in windows.h.
This commit is contained in:
Frederik Seiffert 2021-07-06 12:29:01 +02:00 committed by Frederik Seiffert
parent f492e50308
commit 2212e08863

View file

@ -332,7 +332,7 @@ static NSString *percentQuoted(NSString *s)
- (void)longLongOverflow
{
NSNumber *big = [NSNumber numberWithUnsignedLongLong: 0xffffffffffffffff];
NSNumber *small = [NSNumber numberWithLongLong: 0xffffffffffffffff];
NSNumber *sml = [NSNumber numberWithLongLong: 0xffffffffffffffff];
NSData *data = [NSJSONSerialization dataWithJSONObject: big
options: 0
@ -342,7 +342,7 @@ static NSString *percentQuoted(NSString *s)
NSAssert([string isEqualToString:@"18446744073709551615"], @"unsigned long long");
[string release];
data = [NSJSONSerialization dataWithJSONObject: small
data = [NSJSONSerialization dataWithJSONObject: sml
options: 0
error: NULL];
string = [[NSString alloc] initWithData: data