/
ZincBundleTests.m
52 lines (39 loc) · 1.2 KB
/
ZincBundleTests.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// ZCBundleTests.m
// Zinc-iOS
//
// Created by Andy Mroczkowski on 12/5/11.
// Copyright (c) 2011 MindSnacks. All rights reserved.
//
#import "ZincBundle.h"
#import "ZincBundle+Private.h"
#import "NSFileManager+Zinc.h"
@interface ZincBundleTests : SenTestCase
@end
@implementation ZincBundleTests
#pragma mark Utility
- (NSString*) createEmptyZincBundleWithFormat:(NSInteger)format
{
NSError* error = nil;
NSString* path = TEST_CREATE_TMP_DIR(@"zincbundle");
NSString* formatString = [NSString stringWithFormat:@"%d", format];
NSString* formatPath = [path stringByAppendingPathComponent:@"zinc_format.txt"];
if (![formatString writeToFile:formatPath atomically:NO encoding:NSUTF8StringEncoding error:&error]) {
STFail(@"%@", error);
return nil;
}
return path;
}
#pragma mark Tests
//- (void) testReadFormat1
//{
// NSError* error = nil;
// NSString* path = [self createEmptyZincBundleWithFormat:1];
// ZincFormat format = [ZCBundle readZincFormatFromURL:[NSURL fileURLWithPath:path] error:&error];
// if (format == ZincFormatInvalid) {
// STFail(@"%@", error);
// } else {
// STAssertTrue(format == 1, @"format wrong");
// }
//}
@end