@@ -363,24 +363,27 @@ - (void)testGetBooleanForKey {
363363 @" bool2" : @(0 ),
364364 @" bool3" : @" 1" , // valid bool
365365 @" bool4" : @" 0" , // valid bool
366- @" bool5" : @" YES" , // invalid bool, server expects a number. treated as false
367- @" bool6" : @" NO" , // invalid bool, server expects a number. treated as false
366+ @" bool5" : @" YES" ,
367+ @" bool6" : @" NO" ,
368368 @" bool7" : @(-1 ), // all non-zero numbers are true
369369 @" bool8" : @(1234 ), // all non-zero numbers are true
370- @" bool9" : @[ ] // invalid bool, treated as false
371-
370+ @" bool9" : @[ ], // invalid bool, treated as false
371+ @" bool10" : @" true" ,
372+ @" bool11" : @" false"
372373 };
373374 NSMutableDictionary *dict = [tmp mutableCopy ];
374375
375376 XCTAssertTrue ([dict bnc_getBooleanForKey: @" bool1" ]);
376377 XCTAssertFalse ([dict bnc_getBooleanForKey: @" bool2" ]);
377378 XCTAssertTrue ([dict bnc_getBooleanForKey: @" bool3" ]);
378379 XCTAssertFalse ([dict bnc_getBooleanForKey: @" bool4" ]);
379- XCTAssertFalse ([dict bnc_getBooleanForKey: @" bool5" ]);
380+ XCTAssertTrue ([dict bnc_getBooleanForKey: @" bool5" ]);
380381 XCTAssertFalse ([dict bnc_getBooleanForKey: @" bool6" ]);
381382 XCTAssertTrue ([dict bnc_getBooleanForKey: @" bool7" ]);
382383 XCTAssertTrue ([dict bnc_getBooleanForKey: @" bool8" ]);
383384 XCTAssertFalse ([dict bnc_getBooleanForKey: @" bool9" ]);
385+ XCTAssertTrue ([dict bnc_getBooleanForKey: @" bool10" ]);
386+ XCTAssertFalse ([dict bnc_getBooleanForKey: @" bool11" ]);
384387}
385388
386389@end
0 commit comments