Files
HTMLKit/Tests/HTMLKitTests/HTMLKitParserPerformance.m
T
iska 7ef19f5e20 Ignore performance tests
For now these are ignored for faster testing/iterations.
The test fixture should also be replaced with several smaller
and more representative ones, since it is relatively big.
2017-03-13 23:04:58 +01:00

36 lines
754 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"
#import "HTMLKitTestUtil.h"
@interface HTMLKitParserPerformance : XCTestCase
@end
@implementation HTMLKitParserPerformance
#define HTMLKIT_NO_DOM_CHECKS
- (void)_testParserPerformance
{
NSString *path = [HTMLKitTestUtil pathForFixture:@"HTML Standard" ofType:@"html" inDirectory:@"Fixtures"];
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