+++ /dev/null
-/*--------------------------------------------------------------------------\r
- * Copyright 2009 Taro L. Saito\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *--------------------------------------------------------------------------*/\r
-//--------------------------------------\r
-// XerialJ\r
-//\r
-// XPathExprTest.java\r
-// Since: Sep 29, 2009 2:45:48 PM\r
-//\r
-// $URL$\r
-// $Author$\r
-//--------------------------------------\r
-package org.xerial.lens.relation.lang;\r
-\r
-import org.junit.After;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.xerial.core.XerialException;\r
-import org.xerial.lens.Lens;\r
-import org.xerial.lens.relation.lang.XPathExpr;\r
-import org.xerial.util.log.Logger;\r
-\r
-public class XPathExprTest {\r
-\r
- private static Logger _logger = Logger.getLogger(XPathExprTest.class);\r
-\r
- @Before\r
- public void setUp() throws Exception {}\r
-\r
- @After\r
- public void tearDown() throws Exception {}\r
-\r
- public void parse(String expr) throws XerialException {\r
- XPathExpr e = XPathExpr.parse(expr);\r
- _logger.info(String.format("%s:%s", expr, Lens.toSilk(e)));\r
- }\r
-\r
- @Test\r
- public void testParse() throws Exception {\r
-\r
- parse("//A");\r
- parse("/A");\r
- parse("/A/B");\r
- parse("//A/B//C");\r
- parse("//A[B]");\r
- parse("//A[B][C]");\r
- parse("book[//order]//title");\r
- }\r
-\r
- @Test\r
- public void testPredicate() throws Exception {\r
- parse("A[B]");\r
- }\r
-}\r