From e7126a720fc94ac0d4a876f7acad2d9ce7d35116 Mon Sep 17 00:00:00 2001 From: iska Date: Sun, 26 Oct 2014 18:12:25 +0100 Subject: [PATCH] Add category to overwrite isEqual method in Parse Error tokens for testing All parse error are treated as equal --- HTMLKitTests/HTMLTokenizerTests.m | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/HTMLKitTests/HTMLTokenizerTests.m b/HTMLKitTests/HTMLTokenizerTests.m index ae79952..80a70b3 100644 --- a/HTMLKitTests/HTMLTokenizerTests.m +++ b/HTMLKitTests/HTMLTokenizerTests.m @@ -8,20 +8,36 @@ #import #import +#import "HTMLKitTests.h" #import "HTML5LibTest.h" -@interface HTMLTokenizerTests : XCTestCase +#import "HTMLTokenizer.h" +#import "HTMLTokenizerStates.h" +#import "HTMLTokens.h" + +@implementation HTMLParseErrorToken (Testing) + +- (BOOL)isEqual:(id)object +{ + return [object isKindOfClass:[HTMLParseErrorToken class]]; +} + +@end + +@interface HTMLTokenizerTests : HTMLKitTests @end @implementation HTMLTokenizerTests -- (void)setUp { +- (void)setUp +{ [super setUp]; // Put setup code here. This method is called before the invocation of each test method in the class. } -- (void)tearDown { +- (void)tearDown +{ // Put teardown code here. This method is called after the invocation of each test method in the class. [super tearDown]; }