Skip to content

Commit

Permalink
* tests
Browse files Browse the repository at this point in the history
  • Loading branch information
itod committed Jul 4, 2014
1 parent a2250ee commit d5434fc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/XPLocationPathLibxmlTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -2228,6 +2228,31 @@ - (void)testChapterSlashTitleExceptChapterSlashTitle {
}


- (void)testOpenChapterSlashTitleClosePredicate2ExceptOpenChapterSlashTitleCloasePredicate1 {
[self eval:@"(chapter/title)[2] except (chapter/title)[1]"];

id <XPNodeEnumeration>enm = [_res enumerate];

for (NSUInteger i = 1; i < 2; ++i) {
id <XPNodeInfo>node = [enm nextObject];
TDEqualObjects(@"title", node.name);
TDEquals(XPNodeTypeElement, node.nodeType);
TDEqualObjects(_titles[i], node.stringValue);
}

TDFalse([enm hasMoreObjects]);
}


- (void)testOpenChapterSlashTitleClosePredicate2ExceptOpenChapterSlashTitleCloasePredicate2 {
[self eval:@"(chapter/title)[2] except (chapter/title)[2]"];

id <XPNodeEnumeration>enm = [_res enumerate];

TDFalse([enm hasMoreObjects]);
}


- (void)testChapterSlashTitleIntersectChapterPredicate1SlashTitle {
[self eval:@"chapter/title intersect chapter[1]/title"];

Expand Down

0 comments on commit d5434fc

Please sign in to comment.