mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-05-31 00:00:10 +08:00
Fixed broken iOS build with __GCDWEBSERVER_ENABLE_TESTING__
This commit is contained in:
@@ -26,6 +26,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import <TargetConditionals.h>
|
#import <TargetConditionals.h>
|
||||||
|
#ifdef __GCDWEBSERVER_ENABLE_TESTING__
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#import <netinet/in.h>
|
#import <netinet/in.h>
|
||||||
|
|
||||||
#import "GCDWebServerPrivate.h"
|
#import "GCDWebServerPrivate.h"
|
||||||
@@ -515,6 +520,7 @@ static void _LogResult(NSString* format, ...) {
|
|||||||
if (![actualBody isEqualToData:expectedBody]) {
|
if (![actualBody isEqualToData:expectedBody]) {
|
||||||
_LogResult(@" Bodies not matching:\n Expected: %lu bytes\n Actual: %lu bytes", (unsigned long)expectedBody.length, (unsigned long)actualBody.length);
|
_LogResult(@" Bodies not matching:\n Expected: %lu bytes\n Actual: %lu bytes", (unsigned long)expectedBody.length, (unsigned long)actualBody.length);
|
||||||
success = NO;
|
success = NO;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (GCDWebServerIsTextContentType([expectedHeaders objectForKey:@"Content-Type"])) {
|
if (GCDWebServerIsTextContentType([expectedHeaders objectForKey:@"Content-Type"])) {
|
||||||
NSString* expectedPath = [NSTemporaryDirectory() stringByAppendingPathComponent:[[[NSProcessInfo processInfo] globallyUniqueString] stringByAppendingPathExtension:@"txt"]];
|
NSString* expectedPath = [NSTemporaryDirectory() stringByAppendingPathComponent:[[[NSProcessInfo processInfo] globallyUniqueString] stringByAppendingPathExtension:@"txt"]];
|
||||||
@@ -527,6 +533,7 @@ static void _LogResult(NSString* format, ...) {
|
|||||||
ARC_RELEASE(task);
|
ARC_RELEASE(task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user