Skip to content

Commit

Permalink
Made code spacing in PWzlibTest.m consistent with other test files
Browse files Browse the repository at this point in the history
darcs-hash:20051220142730-5716c-87765e201b3eaac928682a8442c6d1d2cab74885.gz
  • Loading branch information
jmah committed Dec 20, 2005
1 parent ae41faf commit fa83bb5
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Shared Source/Tests/PWzlibTest.m
Expand Up @@ -34,18 +34,21 @@ - (void)testDeflateInflate

// Deflate the data
NSData *deflatedData = [originalData deflate];
STAssertNotNil(deflatedData, @"Deflated data was nil.");
STAssertNotNil(deflatedData,
@"Deflated data was nil.");
STAssertTrue([deflatedData isZlibCompressed],
@"Deflated data incorrectly reported as uncompressed.");


// Inflate the data
NSData *inflatedData = [deflatedData inflate];
STAssertNotNil(inflatedData, @"Inflated data was nil.");
STAssertNotNil(inflatedData,
@"Inflated data was nil.");
STAssertFalse([inflatedData isZlibCompressed],
@"Inflated data incorrectly reported as compressed.");
STAssertEquals([inflatedData length], [originalData length], @"Inflated data differed in length from original data.");
STAssertEqualObjects(inflatedData, originalData, @"Inflated data was not equal to original data.");
STAssertEquals([inflatedData length], [originalData length],
@"Inflated data differed in length from original data.");
STAssertEqualObjects(inflatedData, originalData,
@"Inflated data was not equal to original data.");
}


Expand All @@ -59,17 +62,20 @@ - (void)testCompressedPatchInflate
ofType:@"txt"
inDirectory:@"Test Patches"];
NSData *compressedPatch = [NSData dataWithContentsOfFile:patchPath];
STAssertNotNil(compressedPatch, @"Failed to load compressed patch.");
STAssertNotNil(compressedPatch,
@"Failed to load compressed patch.");

NSData *inflatedPatch = [compressedPatch inflate];
STAssertNotNil(inflatedPatch, @"Failed to inflate patch.");
STAssertNotNil(inflatedPatch,
@"Failed to inflate patch.");

NSString *inflatedContents = [[[NSString alloc] initWithData:inflatedPatch encoding:NSASCIIStringEncoding] autorelease];
NSString *realContents = [NSString stringWithContentsOfFile:uncompressedPath
encoding:NSASCIIStringEncoding
error:nil];

STAssertEqualObjects(inflatedContents, realContents, @"Patch was not inflated correctly.");
STAssertEqualObjects(inflatedContents, realContents,
@"Patch was not inflated correctly.");
}


Expand Down

0 comments on commit fa83bb5

Please sign in to comment.