mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Provide more context when JSON decoding fails.
This commit is contained in:
parent
adf3405e6b
commit
f58f7102f7
@ -41,8 +41,9 @@ struct Chipset {
|
|||||||
NSString *const tracePath = [[NSBundle bundleForClass:[self class]]
|
NSString *const tracePath = [[NSBundle bundleForClass:[self class]]
|
||||||
pathForResource:name ofType:@"json.gz" inDirectory:@"Amiga Blitter Tests"];
|
pathForResource:name ofType:@"json.gz" inDirectory:@"Amiga Blitter Tests"];
|
||||||
NSData *const traceData = [NSData dataWithContentsOfGZippedFile:tracePath];
|
NSData *const traceData = [NSData dataWithContentsOfGZippedFile:tracePath];
|
||||||
NSArray *const trace = [NSJSONSerialization JSONObjectWithData:traceData options:0 error:nil];
|
NSError *error;
|
||||||
XCTAssertNotNil(trace);
|
NSArray *const trace = [NSJSONSerialization JSONObjectWithData:traceData options:0 error:&error];
|
||||||
|
XCTAssertNotNil(trace, @"JSON decoding failed with error %@", error);
|
||||||
|
|
||||||
using TransactionType = Amiga::Blitter<true>::Transaction::Type;
|
using TransactionType = Amiga::Blitter<true>::Transaction::Type;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user