Refactor Tokenizer tests into separate group and generate the test cases dynamically

Instead of loading and running the HTML5Lib test files manually, the Xcode test cases are generated
on start for all the HTML5Lib tokenizer tests. Also, the performance test is moved into its own class.

This setup shouldn't require any extra maintenance when HTML5Lib adds new tokenizer test cases.
This commit is contained in:
iska
2015-03-24 23:50:19 +01:00
parent b6e911a941
commit 7fb04f3394
9 changed files with 246 additions and 244 deletions
+23
View File
@@ -0,0 +1,23 @@
//
// HTML5LibTest.h
// HTMLKit
//
// Created by Iska on 25/10/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HTML5LibTokenizerTest : NSObject
@property (nonatomic, copy) NSString *testFile;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *input;
@property (nonatomic, strong) NSArray *output;
@property (nonatomic, strong) NSArray *initialStates;
@property (nonatomic, copy) NSString *lastStartTag;
@property (nonatomic, assign) BOOL ignoreErrorOrder;
- (instancetype)initWithTestDictionary:(NSDictionary *)dictionary;
@end