@@ -48,24 +48,24 @@ - (void)testCancel {
4848 QNUploadOption *opt = [[QNUploadOption alloc ] initWithMime: nil progressHandler: ^(NSString *key, float percent) {
4949 flag = YES ;
5050 }
51- params: @{ @" x:七牛" : @" objc" ,
52- @" x:no" : @" " ,
53- @" invalid" : @" invalid" }
54- checkCrc: NO
55- cancellationSignal: ^BOOL () {
56- return flag;
57- }];
51+ params: @{ @" x:七牛" : @" objc" ,
52+ @" x:no" : @" " ,
53+ @" invalid" : @" invalid" }
54+ checkCrc: NO
55+ cancellationSignal: ^BOOL () {
56+ return flag;
57+ }];
5858 [_upManager putFile: tempFile.path key: keyUp token: g_token complete: ^(QNResponseInfo *i, NSString *k, NSDictionary *resp) {
5959 key = k;
6060 info = i;
6161 }
6262 option: opt];
63-
63+
6464 AGWW_WAIT_WHILE (key == nil , 60 * 30 );
6565 NSLog (@" info %@ " , info);
6666 XCTAssert (info.isCancelled , @" Pass" );
6767 XCTAssert ([keyUp isEqualToString: key], @" Pass" );
68-
68+
6969 [QNTempFile removeTempfile: tempFile];
7070}
7171
@@ -87,7 +87,7 @@ - (void) template:(int)size {
8787 XCTAssert (info.isOK , @" Pass" );
8888 XCTAssert (info.reqId , @" Pass" );
8989 XCTAssert ([keyUp isEqualToString: key], @" Pass" );
90-
90+
9191 [QNTempFile removeTempfile: tempFile];
9292}
9393
@@ -99,13 +99,13 @@ - (void)templateHttps:(int)size {
9999 QNUploadOption *opt = [[QNUploadOption alloc ] initWithProgressHandler: ^(NSString *key, float percent) {
100100 NSLog (@" progress %f " , percent);
101101 }];
102-
102+
103103 QNConfiguration *config = [QNConfiguration build: ^(QNConfigurationBuilder *builder) {
104104 QNServiceAddress *s = [[QNServiceAddress alloc ] init: @" https://uptemp.qbox.me" ips: nil ];
105105 builder.zone = [[QNZone alloc ] initWithUp: s upBackup: nil ];
106106 }];
107107 QNUploadManager *upManager = [[QNUploadManager alloc ] initWithConfiguration: config];
108-
108+
109109 [upManager putFile: tempFile.path key: keyUp token: g_token complete: ^(QNResponseInfo *i, NSString *k, NSDictionary *resp) {
110110 key = k;
111111 info = i;
@@ -116,7 +116,7 @@ - (void)templateHttps:(int)size {
116116 XCTAssert (info.isOK , @" Pass" );
117117 XCTAssert (info.reqId , @" Pass" );
118118 XCTAssert ([keyUp isEqualToString: key], @" Pass" );
119-
119+
120120 [QNTempFile removeTempfile: tempFile];
121121}
122122
@@ -157,7 +157,7 @@ - (void)test0k {
157157 NSLog (@" info %@ " , info);
158158 XCTAssert (info.statusCode == kQNZeroDataSize , @" Pass" );
159159 XCTAssert ([keyUp isEqualToString: key], @" Pass" );
160-
160+
161161 [QNTempFile removeTempfile: tempFile];
162162}
163163
@@ -202,19 +202,19 @@ - (void)test8M {
202202
203203- (void )testProxy {
204204 NSDictionary *proxyDict = @{
205- @" HTTPEnable" : [NSNumber numberWithInt: 1 ],
206- (NSString *)kCFStreamPropertyHTTPProxyHost : @" 183.136.139.16" ,
207- (NSString *)kCFStreamPropertyHTTPProxyPort : @8888 ,
208- };
209-
205+ @" HTTPEnable" : [NSNumber numberWithInt: 1 ],
206+ (NSString *)kCFStreamPropertyHTTPProxyHost : @" 183.136.139.16" ,
207+ (NSString *)kCFStreamPropertyHTTPProxyPort : @8888 ,
208+ };
209+
210210 QNConfiguration *config = [QNConfiguration build: ^(QNConfigurationBuilder *builder) {
211211 builder.proxy = proxyDict;
212212 QNServiceAddress *s = [[QNServiceAddress alloc ] init: @" http://upnono.qiniu.com" ips: nil ];
213213 builder.zone = [[QNZone alloc ] initWithUp: s upBackup: nil ];
214214 }];
215-
215+
216216 QNUploadManager *upManager = [[QNUploadManager alloc ] initWithConfiguration: config];
217-
217+
218218 int size = 600 ;
219219 NSURL *tempFile = [QNTempFile createTempfileWithSize: size * 1024 ];
220220 NSString *keyUp = [NSString stringWithFormat: @" %d kproxy" , size];
@@ -225,12 +225,12 @@ - (void)testProxy {
225225 info = i;
226226 }
227227 option: nil ];
228-
228+
229229 AGWW_WAIT_WHILE (key == nil , 60 * 30 );
230230 NSLog (@" info %@ " , info);
231231 XCTAssert (info.isOK , @" Pass" );
232232 XCTAssert ([keyUp isEqualToString: key], @" Pass" );
233-
233+
234234 [QNTempFile removeTempfile: tempFile];
235235}
236236
@@ -242,9 +242,9 @@ - (void)testUrlConvert {
242242 QNServiceAddress *s = [[QNServiceAddress alloc ] init: @" http://upnono.qiniu.com" ips: nil ];
243243 builder.zone = [[QNZone alloc ] initWithUp: s upBackup: nil ];
244244 }];
245-
245+
246246 QNUploadManager *upManager = [[QNUploadManager alloc ] initWithConfiguration: config];
247-
247+
248248 int size = 600 ;
249249 NSURL *tempFile = [QNTempFile createTempfileWithSize: size * 1024 ];
250250 NSString *keyUp = [NSString stringWithFormat: @" %d kconvert" , size];
@@ -255,7 +255,7 @@ - (void)testUrlConvert {
255255 info = i;
256256 }
257257 option: nil ];
258-
258+
259259 AGWW_WAIT_WHILE (key == nil , 60 * 30 );
260260 NSLog (@" info %@ " , info);
261261 XCTAssert (info.isOK , @" Pass" );
@@ -274,9 +274,9 @@ - (void)testHosts {
274274 builder.zone = [[QNZone alloc ] initWithUp: s1 upBackup: s2];
275275 builder.dns = dns;
276276 }];
277-
277+
278278 QNUploadManager *upManager = [[QNUploadManager alloc ] initWithConfiguration: config];
279-
279+
280280 int size = 600 ;
281281 NSURL *tempFile = [QNTempFile createTempfileWithSize: size * 1024 ];
282282 NSString *keyUp = [NSString stringWithFormat: @" %d kconvert" , size];
@@ -287,7 +287,7 @@ - (void)testHosts {
287287 info = i;
288288 }
289289 option: nil ];
290-
290+
291291 AGWW_WAIT_WHILE (key == nil , 60 * 30 );
292292 NSLog (@" info %@ " , info);
293293 XCTAssert (info.isOK , @" Pass" );
0 commit comments