Ben Copsey

Move tests to GHUnit

... ... @@ -8,7 +8,6 @@
#import <SenTestingKit/SenTestingKit.h>
@interface ASIFormDataRequestTests : SenTestCase {
float progress;
}
... ...
... ... @@ -139,7 +139,12 @@
//BOOL success = (![[NSFileManager defaultManager] fileExistsAtPath:tempPath]);
//STAssertTrue(success,@"Failed to remove file from temporary location");
NSImage *image = [[[NSImage alloc] initWithContentsOfFile:path] autorelease];
#if TARGET_OS_IPHONE
UIImage *image = [[[UIImage alloc] initWithContentsOfFile:path] autorelease];
#else
NSImage *image = [[[NSImage alloc] initWithContentsOfFile:path] autorelease];
#endif
STAssertNotNil(image,@"Failed to download data to a file");
}
... ...
... ... @@ -12,6 +12,8 @@
@implementation ASINetworkQueueTests
static CFStringRef ASIHTTPRequestTestsRunMode = CFSTR("ASIHTTPRequestTestsRunMode");
- (void)testProgress
{
complete = NO;
... ... @@ -38,9 +40,8 @@
[networkQueue go];
NSDate* endDate = [NSDate distantFuture];
while (!complete) {
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:endDate];
CFRunLoopRunInMode(ASIHTTPRequestTestsRunMode,0.25,YES);
}
BOOL success = (progress == 1.0);
... ... @@ -66,7 +67,8 @@
[networkQueue waitUntilAllOperationsAreFinished];
success = (progress == 1.0);
// Progress maths are inexact for queues
success = (progress > 0.95);
STAssertTrue(success,@"Failed to increment progress properly");
... ... @@ -209,6 +211,7 @@
complete = YES;
}
- (void)testProgressWithAuthentication
{
complete = NO;
... ... @@ -228,9 +231,9 @@
[networkQueue go];
NSDate* endDate = [NSDate distantFuture];
while (!complete) {
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:endDate];
CFRunLoopRunInMode(ASIHTTPRequestTestsRunMode,0.25,YES);
}
NSError *error = [request error];
... ... @@ -252,19 +255,14 @@
[networkQueue go];
while (!complete) {
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:endDate];
CFRunLoopRunInMode(ASIHTTPRequestTestsRunMode,0.25,YES);
}
error = [request error];
STAssertNil(error,@"Failed to use authentication in a queue");
[networkQueue release];
}
@end
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
... ...
This diff was suppressed by a .gitattributes entry.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>GHUnitIPhone.xib</string>
</dict>
</plist>
... ...