Files
HTMLKit/HTMLKitTests/HTMLKitParserPerformance.m
T
iska a7caa34762 Disable HTML DOM checks in parser's performance test
The baseline was set before the DOM validations were implemented.
2015-06-06 20:10:28 +02:00

36 lines
757 B
Objective-C

//
// HTMLKitParserPerformance.m
// HTMLKit
//
// Created by Iska on 11/04/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import <XCTest/XCTest.h>
#import "HTMLParser.h"
@interface HTMLKitParserPerformance : XCTestCase
@end
@implementation HTMLKitParserPerformance
#define HTMLKIT_NO_DOM_CHECKS
- (void)testParserPerformance
{
NSString *path = [[NSBundle bundleForClass:self.class] resourcePath];
path = [path stringByAppendingPathComponent:@"HTML Standard.html"];
NSString *string = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
[self measureBlock:^{
HTMLParser *parser = [[HTMLParser alloc] initWithString:string];
[parser parseDocument];
}];
}
#undef HTMLKIT_NO_DOM_CHECKS
@end