Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 0.711 kB
//
// NSBundleTest.m
// YAJLIPhone
//
// Created by Gabriel Handford on 8/25/10.
// Copyright 2010. All rights reserved.
//
#import "YAJLTestCase.h"
@interface NSBundleTest : YAJLTestCase
@end
@implementation NSBundleTest
- (void)testLoadWithOptions {
NSError *error = nil;
id JSON = [[NSBundle mainBundle] yajl_JSONFromResource:@"example.json" options:YAJLParserOptionsAllowComments error:&error];
GHAssertNil(error, nil);
GHTestLog([JSON description]);
GHAssertTrue([JSON isKindOfClass:[NSDictionary class]], nil);
}
- (void)testLoadAndException {
GHAssertThrowsSpecificNamed([[NSBundle mainBundle] yajl_JSONFromResource:@"error.json"], NSException, YAJLParserException, nil);
}
@end
Jump to Line
Something went wrong with that request. Please try again.