CVS Update: xmlpull-api-v1/src/java/tests/org/xmlpull/v1/tests

Aleksander Andrzej Slominski <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
aslom       02/08/14 08:46:20

  Modified:    src/java/tests/org/xmlpull/v1/tests TestToken.java
  Log:
  fixed TestToken to correctly work when multiple
    IGNORABLE_WHITESPACE events are returned by nextToken()
    for ignorable content outside docuemtn root element
  
  Revision  Changes    Path
  1.12      +7 -5      xmlpull-api-v1/src/java/tests/org/xmlpull/v1/tests/TestToken.java
  
  Index: TestToken.java
  ===================================================================
  RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/tests/org/xmlpull/v1/tests/TestToken.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -t -w -r1.11 -r1.12
  --- TestToken.java	2002/08/08 05:05:37	1.11
  +++ TestToken.java	2002/08/14 13:46:20	1.12
  @@ -104,7 +104,7 @@
                                  boolean useRoundtrip) throws Exception {
           XmlPullParser xpp = factory.newPullParser();
           assertEquals(true, xpp.getFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES));
  -        System.out.println("using "+xpp);
  +        //System.out.println("using "+xpp);
   
           if(checkPrologAndEpilog) {
               xpp.setInput(new StringReader(MISC_XML));
  @@ -157,7 +157,8 @@
                   //              xpp.nextToken();
                   //              checkParserStateNs(xpp, 0, xpp.IGNORABLE_WHITESPACE, null, 0, null, null, "  \r\n", false, -1);
                   //              assertTrue(xpp.isWhitespace());
  -                String text = nextTokenGathered(xpp, xpp.IGNORABLE_WHITESPACE, true);
  +                //String text = nextTokenGathered(xpp, xpp.IGNORABLE_WHITESPACE, true);
  +                String text = gatherTokenText(xpp, xpp.IGNORABLE_WHITESPACE, true);
                   if(roundtripSupported) {
                       assertEquals(printable("  \r\n"), printable(text));
                   } else {
  @@ -300,7 +301,8 @@
                   //              checkParserStateNs(xpp, 0, xpp.IGNORABLE_WHITESPACE, null, 0, null, null,
                   //                                 " \r\n", false, -1);
                   //              assertTrue(xpp.isWhitespace());
  -                String text = nextTokenGathered(xpp, xpp.IGNORABLE_WHITESPACE, true);
  +                //String text = nextTokenGathered(xpp, xpp.IGNORABLE_WHITESPACE, true);
  +                String text = gatherTokenText(xpp, xpp.IGNORABLE_WHITESPACE, true);
                   if(roundtripSupported) {
                       assertEquals(printable("\r\n "), printable(text));
                   } else {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.