diff options
-rw-r--r-- | gwtquery-core/src/test/java/com/google/gwt/query/client/impl/SelectorEnginesTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/impl/SelectorEnginesTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/impl/SelectorEnginesTest.java index 7b8199ee..765dcfab 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/impl/SelectorEnginesTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/impl/SelectorEnginesTest.java @@ -77,6 +77,12 @@ public class SelectorEnginesTest extends GWTTestCase { assertEquals(".//div[@class='comment' and (contains(string(.),'John'))]", sel.css2Xpath("div[@class='comment']:contains('John')")); + + assertEquals(".//div[@role='treeItem' and (position() mod 2=0 and position()>=0)]", + sel.css2Xpath("div[role=treeItem]:odd")); + + assertEquals(".//div[@role='treeItem' and ((count(preceding-sibling::*) + 1) mod 2=1)]", + sel.css2Xpath("div[role=treeItem]:even")); } } |