You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ro...@locus.apache.org on 2000/01/26 20:35:58 UTC

cvs commit: xml-xerces/c/tests/ParserTest ParserTest.cpp ParserTest_Parser.cpp

roddey      00/01/26 11:35:58

  Modified:    c/tests/ParserTest ParserTest.cpp ParserTest_Parser.cpp
  Log:
  When the /Debug output format is used, it will spit out source offset
  data as well now.
  
  Revision  Changes    Path
  1.5       +4 -1      xml-xerces/c/tests/ParserTest/ParserTest.cpp
  
  Index: ParserTest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/ParserTest/ParserTest.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParserTest.cpp	2000/01/21 23:58:06	1.4
  +++ ParserTest.cpp	2000/01/26 19:35:57	1.5
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: ParserTest.cpp,v $
  + * Revision 1.5  2000/01/26 19:35:57  roddey
  + * When the /Debug output format is used, it will spit out source offset
  + * data as well now.
  + *
    * Revision 1.4  2000/01/21 23:58:06  roddey
    * Initial move away from util streams was bad. Wide char APIs didn't allow enough
    * control to do canonical output, so changed to use std short char APIs.
  @@ -81,7 +85,6 @@
   #include    <internal/XMLScanner.hpp>
   #include    <validators/DTD/DTDValidator.hpp>
   #include    "ParserTest.hpp"
  -
   
   
   // ---------------------------------------------------------------------------
  
  
  
  1.5       +43 -16    xml-xerces/c/tests/ParserTest/ParserTest_Parser.cpp
  
  Index: ParserTest_Parser.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/ParserTest/ParserTest_Parser.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParserTest_Parser.cpp	2000/01/25 01:02:12	1.4
  +++ ParserTest_Parser.cpp	2000/01/26 19:35:57	1.5
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: ParserTest_Parser.cpp,v $
  + * Revision 1.5  2000/01/26 19:35:57  roddey
  + * When the /Debug output format is used, it will spit out source offset
  + * data as well now.
  + *
    * Revision 1.4  2000/01/25 01:02:12  roddey
    * More small fixes in the output from the recent change to get away from
    * the util/xx streams.
  @@ -139,6 +143,8 @@
           cout << "Got CHARS:\n    Bytes: "
                << length << ", CDATA?: "
                << (cdataSection ? "Yes" : "No")
  +             << "\n"
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
                << "\n" << endl;
       }
        else if ((fOutputType == OutputType_JCCanon)
  @@ -162,7 +168,8 @@
       {
           cout << "Got document COMMENT:\n    "
                << "Text: \"" << StrX(comment) << "\"\n"
  -             << endl;
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType == OutputType_XML)
       {
  @@ -181,9 +188,10 @@
                << "Target: \"" << target << '"';
   
           if (XMLString::stringLen(data))
  -            cout << ", Data: \"" << StrX(data) << '"';
  +            cout << ", Data: \"" << StrX(data) << "\"\n";
   
  -        cout << "\n" << endl;
  +        cout << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if ((fOutputType == OutputType_XML)
             ||  (fOutputType == OutputType_JCCanon)
  @@ -203,7 +211,9 @@
   {
       if (fOutputType == OutputType_Debug)
       {
  -        cout << "Got ENDDOCUMENT:\n" << endl;
  +        cout << "Got ENDDOCUMENT:\n"
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType == OutputType_SunCanon)
       {
  @@ -233,7 +243,8 @@
                    << StrX(elemDecl.getFullName()) << endl;
           }
   
  -        cout << endl;
  +        cout << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if ((fOutputType == OutputType_XML)
             ||  (fOutputType == OutputType_JCCanon)
  @@ -267,6 +278,8 @@
           cout << "Got WHITESPACE:\n    Bytes: "
                << length << ", CDATA?: "
                << (cdataSection ? "Yes" : "No")
  +             << "\n"
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
                << "\n" << endl;
       }
        else if (fOutputType == OutputType_XML)
  @@ -335,6 +348,8 @@
                    << "\n";
           }
   
  +        cout << "    SrcOfs: " << fScanner->getSrcOffset() << "\n";
  +
           // If any attributes, then show them
           if (attCount)
           {
  @@ -462,7 +477,8 @@
                << " Standalone:\"" << StrX(standaloneStr) << "\""
                << " Auto Encoding:\"" << StrX(autoEncStr) << "\""
                << "\n"
  -             << endl;
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType == OutputType_XML)
       {
  @@ -501,7 +517,8 @@
           if (XMLString::stringLen(attDef.getValue()))
               cout << ", Value: \"" << StrX(attDef.getValue()) << '"';
   
  -        cout << "\n" << endl;
  +        cout << "\n    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {
  @@ -548,7 +565,8 @@
       {
           cout << "Got DTD COMMENT:\n    "
                << "Text: \"" << StrX(comment) << "\"\n"
  -             << endl;
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {
  @@ -576,7 +594,8 @@
           if (XMLString::stringLen(systemId))
               cout << ", SYSTEM: " << StrX(systemId);
   
  -        cout << "\n" << endl;
  +        cout << "\n    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {
  @@ -601,7 +620,9 @@
   
           if (XMLString::stringLen(data))
               cout << ", Data: \"" << StrX(data) << '"';
  -        cout << "\n" << endl;
  +
  +        cout << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {
  @@ -624,7 +645,9 @@
       if (fOutputType == OutputType_Debug)
       {
           cout << "Got DTD Spaces:\n    Bytes: "
  -             << length << "\n" << endl;
  +             << length << "\n"
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {
  @@ -647,9 +670,10 @@
           if (isIgnored)
               cout << " (Ignored)";
   
  -        cout << ", Content: ";
  -        cout << StrX(decl.getFormattedContentModel(*fScanner->getValidator()));
  -        cout << "\n" << endl;
  +        cout << ", Content: "
  +             << StrX(decl.getFormattedContentModel(*fScanner->getValidator()))
  +             << "\n    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {
  @@ -671,7 +695,8 @@
       {
           cout << "Got ENDATTLIST:\n    "
                << "Name: " << StrX(elemDecl.getFullName()) << "\n"
  -             << endl;
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {
  @@ -687,7 +712,9 @@
   {
       if (fOutputType == OutputType_Debug)
       {
  -        cout << "Got ENDINTSUBSET\n" << endl;
  +        cout << "Got ENDINTSUBSET\n"
  +             << "    SrcOfs: " << fScanner->getSrcOffset()
  +             << "\n" << endl;
       }
        else if (fOutputType != OutputType_None)
       {