commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject cvs commit: jakarta-commons/jxpath/src/test/org/apache/commons/jxpath JXPathTestCase.java
Date Thu, 30 May 2002 01:57:35 GMT
dmitri      02/05/29 18:57:35

  Modified:    jxpath/src/test/org/apache/commons/jxpath
                        JXPathTestCase.java
  Log:
  Fixed #9482
  
  Revision  Changes    Path
  1.21      +13 -4     jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java
  
  Index: JXPathTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JXPathTestCase.java	29 May 2002 00:42:06 -0000	1.20
  +++ JXPathTestCase.java	30 May 2002 01:57:35 -0000	1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java,v
1.20 2002/05/29 00:42:06 dmitri Exp $
  - * $Revision: 1.20 $
  - * $Date: 2002/05/29 00:42:06 $
  + * $Header: /home/cvs/jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java,v
1.21 2002/05/30 01:57:35 dmitri Exp $
  + * $Revision: 1.21 $
  + * $Date: 2002/05/30 01:57:35 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -95,7 +95,7 @@
    * </p>
    *
    * @author Dmitri Plotnikov
  - * @version $Revision: 1.20 $ $Date: 2002/05/29 00:42:06 $
  + * @version $Revision: 1.21 $ $Date: 2002/05/30 01:57:35 $
    */
   
   public class JXPathTestCase extends TestCase
  @@ -305,6 +305,7 @@
           }
           Map map = new HashMap();
           map.put("foo", new String[]{"a", "b", "c"});
  +
           JXPathContext context = JXPathContext.newContext(map);
           testIterate(context, "foo", list("a", "b", "c"));
   
  @@ -319,6 +320,14 @@
               actual.add(it.next());
           }
           assertEquals("Iterating <" + xpath + ">", expected, actual);
  +
  +        it = context.iteratePointers(xpath);
  +        actual = new ArrayList();
  +        while (it.hasNext()){
  +            Pointer ptr = (Pointer)it.next();
  +            actual.add(context.getValue(ptr.asPath()));
  +        }
  +        assertEquals("Iterating pointers <" + xpath + ">", expected, actual);
       }
   
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message