You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/11/23 17:18:54 UTC

cvs commit: xml-xerces/c/tests/IDom/ITraversal ITraversal.cpp

tng         01/11/23 08:18:54

  Modified:    c/tests/DOM/DOMIDTest DOMIDTest.cpp
               c/tests/DOM/DOMMemTest DOMMemTest.cpp
               c/tests/DOM/RangeTest RangeTest.cpp
               c/tests/DOM/Traversal Traversal.cpp
               c/tests/IDom/IRangeTest IRangeTest.cpp
               c/tests/IDom/ITraversal ITraversal.cpp
  Log:
  Elimiate compiler warning: Warning: String literal converted to char* in formal argument file in call to tassert(bool, char*, int).
  
  Revision  Changes    Path
  1.8       +1 -1      xml-xerces/c/tests/DOM/DOMIDTest/DOMIDTest.cpp
  
  Index: DOMIDTest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/DOMIDTest/DOMIDTest.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DOMIDTest.cpp	2001/11/09 14:44:02	1.7
  +++ DOMIDTest.cpp	2001/11/23 16:18:54	1.8
  @@ -75,7 +75,7 @@
   //-------------------------------------------------------------
   #define TASSERT(c) tassert((c), __FILE__, __LINE__)
   
  -void tassert(bool c, char *file, int line)
  +void tassert(bool c, const char *file, int line)
   {
       if (!c)
           printf("Failure.  Line %d,   file %s\n", line, file);
  
  
  
  1.27      +2 -2      xml-xerces/c/tests/DOM/DOMMemTest/DOMMemTest.cpp
  
  Index: DOMMemTest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/DOMMemTest/DOMMemTest.cpp,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- DOMMemTest.cpp	2001/11/09 14:42:43	1.26
  +++ DOMMemTest.cpp	2001/11/23 16:18:54	1.27
  @@ -65,7 +65,7 @@
   //
   
   /*
  - * $Id: DOMMemTest.cpp,v 1.26 2001/11/09 14:42:43 tng Exp $
  + * $Id: DOMMemTest.cpp,v 1.27 2001/11/23 16:18:54 tng Exp $
    */
   
   #include <stdio.h>
  @@ -80,7 +80,7 @@
   
   #define TASSERT(c) tassert((c), __FILE__, __LINE__)
   
  -void tassert(bool c, char *file, int line)
  +void tassert(bool c, const char *file, int line)
   {
       if (!c)
           printf("Failure.  Line %d,   file %s\n", line, file);
  
  
  
  1.3       +70 -70    xml-xerces/c/tests/DOM/RangeTest/RangeTest.cpp
  
  Index: RangeTest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/RangeTest/RangeTest.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RangeTest.cpp	2000/12/06 19:42:48	1.2
  +++ RangeTest.cpp	2001/11/23 16:18:54	1.3
  @@ -1,37 +1,37 @@
   /*
    * The Apache Software License, Version 1.1
  - * 
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + *
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
  - * 
  + *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
  - * 
  + *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  - * 
  + *    notice, this list of conditions and the following disclaimer.
  + *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
    *    the documentation and/or other materials provided with the
    *    distribution.
  - * 
  + *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
  - * 
  + *
    * 4. The names "Xerces" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache\@apache.org.
  - * 
  + *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
    *    permission of the Apache Software Foundation.
  - * 
  + *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  @@ -45,7 +45,7 @@
    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    * ====================================================================
  - * 
  + *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation, and was
    * originally based on software copyright (c) 1999, International
  @@ -57,14 +57,14 @@
   
   
   /**
  - * $Id: RangeTest.cpp,v 1.2 2000/12/06 19:42:48 tng Exp $
  + * $Id: RangeTest.cpp,v 1.3 2001/11/23 16:18:54 tng Exp $
    */
   
   
   /** This RangeTest tests all of the cases delineated as examples
    *  in the DOM Level 2 Range specification, and a few others.
  - *  <p>These do not by any means completely test the API and 
  - *  corner cases. 
  + *  <p>These do not by any means completely test the API and
  + *  corner cases.
    */
   
   #include <stdio.h>
  @@ -82,7 +82,7 @@
   
   #define TASSERT(c) tassert((c), __FILE__, __LINE__)
   
  -void tassert(bool c, char *file, int line)
  +void tassert(bool c, const char *file, int line)
   {
       if (!c)
           printf("Failure.  Line %d,   file %s\n", line, file);
  @@ -130,13 +130,13 @@
   
       /*
       Range tests include testing of
  -    
  +
       createRange
   
  -    setStart, setStartBefore. setStartAfter, 
  +    setStart, setStartBefore. setStartAfter,
       setEnd, setEndBefore. setEndAfter
       getStartContainer, getStartOffset
  -    getEndContainer, getEndOffset    
  +    getEndContainer, getEndOffset
       getCommonAncestorContainer
       selectNode
       selectNodeContents
  @@ -152,38 +152,38 @@
       toString
       detach
       removeChild
  -    */  
  +    */
       {
  -        
  +
           {
               DOM_Document    doc = DOM_Document::createDocument();
               //Creating a root element
               DOM_Element     root = doc.createElement("Body");
               doc.appendChild(root);
  -            
  +
               //Creating the siblings of root
               DOM_Element     E11 = doc.createElement("H1");
               root.appendChild(E11);
  -            
  +
               DOM_Element     E12 = doc.createElement("P");
               root.appendChild(E12);
  -            
  +
               //Attaching texts to siblings
               DOM_Text        textNode1 = doc.createTextNode("Title");
               E11.appendChild(textNode1);
  -            
  +
               DOM_Text        textNode11 = doc.createTextNode("AnotherText");
               E11.appendChild(textNode11);
  -            
  +
               DOM_Text        textNode2 = doc.createTextNode("Blah xyz");
               E12.appendChild(textNode2);
  -            
  +
               DOM_Text     E210 = doc.createTextNode("insertedText");
  -            
  -            
  +
  +
           }
  -        
  -        
  +
  +
           TESTPROLOG;
           {
               //DOM Tree and some usable node creation
  @@ -191,37 +191,37 @@
               //Creating a root element
               DOM_Element     root = doc.createElement("Body");
               doc.appendChild(root);
  -            
  +
               //Creating the siblings of root
               DOM_Element     E11 = doc.createElement("H1");
               root.appendChild(E11);
  -            
  +
               DOM_Element     E12 = doc.createElement("P");
               root.appendChild(E12);
  -            
  +
               //Attaching texts to siblings
               DOM_Text        textNode1 = doc.createTextNode("Title");
               E11.appendChild(textNode1);
  -            
  +
               DOM_Text        textNode11 = doc.createTextNode("AnotherText");
               E11.appendChild(textNode11);
  -            
  +
               DOM_Text        textNode2 = doc.createTextNode("Blah xyz");
               E12.appendChild(textNode2);
  -            
  +
               //experimental nodes
               DOM_Element     E120 = doc.createElement("Element1");
               DOM_Element     E121 = doc.createElement("Element2");
               DOM_Element     E122 = doc.createElement("Element3");
               DOM_Element     E311 = doc.createElement("SurroundNode1");
  -            
  +
               DOM_Text     E210 = doc.createTextNode("insertedText");
  -            
  +
               DOM_Node rt = doc.getDocumentElement();
               DOM_Range range = doc.createRange();
  +
   
  -     
  -     
  +
               //Tests start here
               // Initial dom tree looks like :
               // <Body><H1>TitleAnother Text</H1><P>Blah xyz</P></Body>
  @@ -231,13 +231,13 @@
               //  ___H1(E11)___                    P(E12)
               //  |           |                    |
               //  "Title"  "Another Text"        "Blah xyz"
  +
   
  -  
               //test for start and end settings of a range
               range.setStart(rt.getFirstChild(), 0);
               TASSERT(range.getStartContainer() == rt.getFirstChild() );
               TASSERT(range.getStartOffset() == 0);
  -  
  +
               range.setEnd(rt.getFirstChild(), 1);
               TASSERT(range.getEndContainer() == rt.getFirstChild() );
               TASSERT(range.getEndOffset() == 1);
  @@ -245,7 +245,7 @@
   
               DOM_Node node = range.getCommonAncestorContainer();
               TASSERT(range.getCommonAncestorContainer() == rt.getFirstChild());
  -           
  +
               //selection related test
               range.selectNode(rt.getLastChild());
               TASSERT(range.getStartContainer() == rt);
  @@ -255,7 +255,7 @@
   
               //insertion related tests
               range.insertNode(E120);
  - 
  +
               //only end offset moves and new node gets into range as being inserted at boundary point
               TASSERT(range.getStartContainer() == rt);
               TASSERT(range.getStartOffset() == 1);
  @@ -302,7 +302,7 @@
               TASSERT(range.getStartContainer() == rt.getFirstChild().getNextSibling().getFirstChild());
               TASSERT(range.getStartContainer().getNodeValue().equals("Title"));
               TASSERT(range.getStartOffset() == 2);
  -          
  +
               range.setEnd(rt.getFirstChild().getNextSibling().getFirstChild(), 4);
               TASSERT(range.getEndContainer() == rt.getFirstChild().getNextSibling().getFirstChild());
               TASSERT(range.getEndContainer().getNodeValue().equals("Title"));
  @@ -350,7 +350,7 @@
               //
               // range has "ReplacedText" as start container and "tle" as end container
               //   and 0 as start offset, 2 as end offset
  -       
  +
               //changing the selection. Preparing for 'surround'
               range.setStart(range.getStartContainer().getParentNode(), 2);
               range.setEnd(range.getStartContainer(), 5);
  @@ -358,7 +358,7 @@
               TASSERT(range.getEndContainer().getNodeName().equals("H1"));
               TASSERT(range.toString().equals("insertedTexttle"));
   
  -            range.surroundContents(E311);          
  +            range.surroundContents(E311);
               TASSERT(range.getStartContainer().getNodeName().equals("H1"));
               TASSERT(range.getStartOffset() == 2);
               TASSERT(range.getEndContainer().getNodeName().equals("H1"));
  @@ -380,8 +380,8 @@
               //                          Element1(E120)   "insertedText"(E210)   "tle"
               //
               // range has H1 as start and end container and 2 as start offset, 3 as end offset
  -                 
  -            //testing cloning            
  +
  +            //testing cloning
               DOM_Range aRange = range.cloneRange();
   
               TASSERT(aRange.getStartContainer() == range.getStartContainer());
  @@ -393,7 +393,7 @@
   
               //comparing the ranges
               short compVal = range.compareBoundaryPoints(DOM_Range::END_TO_END, aRange);
  -            TASSERT(compVal == 0); 
  +            TASSERT(compVal == 0);
               compVal = range.compareBoundaryPoints(DOM_Range::START_TO_START, aRange);
               TASSERT(compVal == 1);
               compVal = range.compareBoundaryPoints(DOM_Range::START_TO_END, aRange);
  @@ -407,14 +407,14 @@
               TASSERT(range.getStartOffset() == 2);
               TASSERT(range.getEndOffset() == 3);
   
  -            //selectNodeContents 
  +            //selectNodeContents
               range.selectNodeContents(rt.getLastChild().getFirstChild());
               TASSERT(range.getStartContainer() == rt.getLastChild().getFirstChild());
               TASSERT(range.getEndContainer() == rt.getLastChild().getFirstChild());
               TASSERT(range.getStartOffset() == 0);
               TASSERT(range.getEndOffset() == 8);
               TASSERT(range.toString().equals("Blah xyz"));
  -            
  +
               //testing collapse
               range.collapse(true); //collapse to start
               TASSERT(range.getCollapsed() == true);
  @@ -423,7 +423,7 @@
               TASSERT(range.toString().equals(""));
               TASSERT(aRange.getEndOffset() == 3); //other range is unaffected
               TASSERT(aRange.toString().equals("eplacedTextinsertedTexttle"));
  -           
  +
               //After above operations, now the tree looks like:
               // <Body><Element3/><H1>ReplacedText<SurroundNode1><Element1/>insertedTexttle</SurroundNode1>Another Text</H1><Element2/><P>Blah xyz</P></Body>
               //i.e.,            Body(rt)
  @@ -439,15 +439,15 @@
               // range has "Blah xyz" as start and end container and 0 as start and end offset (collapsed)
               // aRange has "ReplacedText" as start container and H1 as end container
               //    and 1 as start offset and 3 as end offset
  -       
  +
               DOM_DocumentFragment docFrag = aRange.cloneContents();
               TASSERT( docFrag != 0);
               range.selectNode(rt.getFirstChild());
  -            TASSERT(range.getStartContainer() == rt); 
  +            TASSERT(range.getStartContainer() == rt);
               TASSERT(range.getEndContainer() == rt);
               TASSERT(range.getStartOffset() == 0);
               TASSERT(range.getEndOffset() == 1);
  -            
  +
               //Testing toString()
               const char* str = aRange.toString().transcode();
               char* str2 = "eplacedTextinsertedTexttle";
  @@ -460,16 +460,16 @@
               TASSERT(range.getEndOffset() == 0);
               range.setStartAfter(rt.getLastChild());
               TASSERT(range.getStartOffset() == 4);
  -           
  +
               range.setStartAfter(rt.getFirstChild());
               TASSERT(range.getStartOffset() == 1);
  -            
  +
               range.setEndBefore(rt.getLastChild());
               TASSERT(range.getEndOffset() == 3);
  -            
  +
               range.setEndAfter(rt.getLastChild());
               TASSERT(range.getEndOffset() == 4);
  -            
  +
               //testing extract()
               DOM_DocumentFragment frag2 = range.extractContents();
               TASSERT( frag2 != 0);
  @@ -894,21 +894,21 @@
   
       }
       TESTEPILOG;
  -            
  -    
  +
  +
       } //creating the dom tree and tests
  -    
  -    
  +
  +
       //
       //  Print Final allocation stats for full test
       //
       DomMemDebug().print();
  -    
  +
       // And call the termination method
       XMLPlatformUtils::Terminate();
  -    
  +
       return 0;
   };
  +
  +
   
  - 
  -    
  
  
  
  1.3       +52 -48    xml-xerces/c/tests/DOM/Traversal/Traversal.cpp
  
  Index: Traversal.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/Traversal/Traversal.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Traversal.cpp	2000/03/11 03:19:57	1.2
  +++ Traversal.cpp	2001/11/23 16:18:54	1.3
  @@ -1,37 +1,37 @@
   /*
    * The Apache Software License, Version 1.1
  - * 
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + *
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
  - * 
  + *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
  - * 
  + *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  - * 
  + *    notice, this list of conditions and the following disclaimer.
  + *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
    *    the documentation and/or other materials provided with the
    *    distribution.
  - * 
  + *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
  - * 
  + *
    * 4. The names "Xerces" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache\@apache.org.
  - * 
  + *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
    *    permission of the Apache Software Foundation.
  - * 
  + *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  @@ -45,7 +45,7 @@
    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    * ====================================================================
  - * 
  + *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation, and was
    * originally based on software copyright (c) 1999, International
  @@ -66,6 +66,9 @@
   
   /**
    * $Log: Traversal.cpp,v $
  + * Revision 1.3  2001/11/23 16:18:54  tng
  + * Elimiate compiler warning: Warning: String literal converted to char* in formal argument file in call to tassert(bool, char*, int).
  + *
    * Revision 1.2  2000/03/11 03:19:57  chchou
    * Fix bug # 19, add const keyword to API.
    * As a result, update test case.
  @@ -93,7 +96,7 @@
   
   #define TASSERT(c) tassert((c), __FILE__, __LINE__)
   
  -void tassert(bool c, char *file, int line)
  +void tassert(bool c, const char *file, int line)
   {
       if (!c)
           printf("Failure.  Line %d,   file %s\n", line, file);
  @@ -126,7 +129,7 @@
   
   class  MyFilter : public DOM_NodeFilter {
   public:
  -    
  +
     MyFilter(short nodeType, bool reject=false) : DOM_NodeFilter(), fNodeType(nodeType), fReject(reject) {};
     virtual short acceptNode(const DOM_Node &node) const;
   private:
  @@ -179,7 +182,7 @@
       //
       //  Doc - Create a small document tree
       //
  -    
  +
       {
           //creating a DOM Tree
            /* Tests are based on the tree structure below
  @@ -216,15 +219,15 @@
           E11.appendChild(E111);
           DOM_Attr        attr01  = doc.createAttribute("Attr01");
           E11.setAttributeNode(attr01);
  -        
  +
           DOM_Element     E112 = doc.createElement("FirstSiblingChild2");
           E11.appendChild(E112);
   
           DOM_Element     E121 = doc.createElement("SecondSiblingChild1");
           E12.appendChild(E121);
           DOM_Attr attr02 = doc.createAttribute("Attr01");
  -        E12.setAttributeNode(attr02);  
  -                
  +        E12.setAttributeNode(attr02);
  +
           DOM_Element     E122 = doc.createElement("SecondSiblingChild2");
           E12.appendChild(E122);
   
  @@ -236,11 +239,11 @@
   
           DOM_CDATASection  cdataSec = doc.createCDATASection("DocCDataSection");
           E11.appendChild(cdataSec);
  -        
  +
           DOM_ProcessingInstruction  docPI = doc.createProcessingInstruction("DocPI", "DocTarget");
           E13.appendChild(docPI);
  -        
  -        
  +
  +
           /*
           following are whatToShow types:
               SHOW_ALL                       = 0x0000FFFF,
  @@ -267,11 +270,11 @@
               DOM_Node    node = doc.getFirstChild();
               unsigned long       whatToShow = DOM_NodeFilter::SHOW_ALL;
               MyFilter* filter = new MyFilter(0);
  -        
  +
               DOM_NodeIterator  iter = doc.createNodeIterator(root, whatToShow,  filter, true);
               TASSERT(iter.getWhatToShow() == 65535);
               TASSERT(iter.getExpandEntityReferences() == 1);
  -            
  +
               DOM_Node  nd;
               nd = iter.nextNode();
               TASSERT (nd ==root);
  @@ -307,7 +310,7 @@
               TASSERT(nd == docPI);
               nd = iter.previousNode();
               TASSERT(nd == E131);
  -            
  +
           }
           TESTEPILOG;
   
  @@ -318,11 +321,11 @@
               DOM_Node    node = doc.getFirstChild();
               unsigned long       whatToShow = DOM_NodeFilter::SHOW_ELEMENT;
               MyFilter* filter = new MyFilter(DOM_Node::ELEMENT_NODE);
  -        
  +
               DOM_NodeIterator  iter = doc.createNodeIterator(root, whatToShow,  filter, true);
               TASSERT(iter.getWhatToShow() == 1);
               TASSERT(iter.getExpandEntityReferences() == 1);
  -            
  +
               DOM_Node  nd;
               nd = iter.nextNode();
               TASSERT (nd ==root);
  @@ -360,12 +363,12 @@
               DOM_Node    node = doc.getFirstChild();
               unsigned long       whatToShow = DOM_NodeFilter::SHOW_TEXT;
               MyFilter* filter = new MyFilter(DOM_Node::TEXT_NODE);
  -        
  +
               DOM_NodeIterator  iter = doc.createNodeIterator(root, whatToShow,  filter, true);
  -            
  +
               TASSERT(iter.getWhatToShow() == 4);
               TASSERT(iter.getExpandEntityReferences() == 1);
  -            
  +
               DOM_Node  nd;
               nd = iter.nextNode();
               TASSERT (nd ==textNode1);
  @@ -373,27 +376,27 @@
               TASSERT (nd ==textNode2);
               nd = iter.previousNode();
               TASSERT(nd == textNode2);
  -            
  +
           }
           TESTEPILOG;
           TESTPROLOG;
           {
               //CDataSection node itearating test
  -            
  +
               DOM_Node    node = doc.getFirstChild();
               unsigned long       whatToShow = DOM_NodeFilter::SHOW_CDATA_SECTION;
               MyFilter* filter = new MyFilter(DOM_Node::CDATA_SECTION_NODE);
  -        
  +
               DOM_NodeIterator  iter = doc.createNodeIterator(root, whatToShow,  filter, true);
               TASSERT(iter.getWhatToShow() == 8);
               TASSERT(iter.getExpandEntityReferences() == 1);
  -            
  +
               DOM_Node  nd;
               nd = iter.nextNode();
               TASSERT(nd == cdataSec);
               nd = iter.nextNode();
               TASSERT(nd == 0);
  -        
  +
           }
           TESTEPILOG;
           TESTPROLOG;
  @@ -403,31 +406,31 @@
               DOM_Node    node = doc.getFirstChild();
               unsigned long       whatToShow = DOM_NodeFilter::SHOW_PROCESSING_INSTRUCTION;
               MyFilter* filter = new MyFilter(DOM_Node::PROCESSING_INSTRUCTION_NODE);
  -        
  +
               DOM_NodeIterator  iter = doc.createNodeIterator(root, whatToShow,  filter, true);
               TASSERT(iter.getWhatToShow() == 64);
               TASSERT(iter.getExpandEntityReferences() == 1);
  -            
  +
               DOM_Node  nd;
               nd = iter.nextNode();
               TASSERT(nd == docPI);
               nd = iter.nextNode();
               TASSERT(nd == 0);
  -        
  -        
  +
  +
           }
           TESTEPILOG;
  -       
  +
           TESTPROLOG;
           {
               DOM_Node    node = doc.getFirstChild();
               unsigned long       whatToShow = DOM_NodeFilter::SHOW_COMMENT;
               MyFilter* filter = new MyFilter(DOM_Node::COMMENT_NODE);
  -        
  +
               DOM_NodeIterator  iter = doc.createNodeIterator(root, whatToShow,  filter, true);
               TASSERT(iter.getWhatToShow() == 128);
               TASSERT(iter.getExpandEntityReferences() == 1);
  -            
  +
               DOM_Node  nd;
               nd = iter.nextNode();
               TASSERT(nd == comment);
  @@ -436,12 +439,12 @@
   
           }
           TESTEPILOG;
  +
   
  -        
   
           ////////// TreeWalker Test Cases ////////////////
  -       
   
  +
           TESTPROLOG;
           {
               unsigned long whatToShow = DOM_NodeFilter::SHOW_ALL;
  @@ -534,15 +537,15 @@
               TASSERT(tw.nextNode() == 0);    //E11 rejected so can't get to textNode1
           }
           TESTEPILOG;
  -       
  +
       };
  -  
  +
   
       //
       //  Print Final allocation stats for full test
       //
       DomMemDebug().print();
  -    
  +
       return 0;
       };
  -    
  +
  
  
  
  1.6       +2 -2      xml-xerces/c/tests/IDom/IRangeTest/IRangeTest.cpp
  
  Index: IRangeTest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/IDom/IRangeTest/IRangeTest.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IRangeTest.cpp	2001/07/19 20:45:15	1.5
  +++ IRangeTest.cpp	2001/11/23 16:18:54	1.6
  @@ -57,7 +57,7 @@
   
   
   /**
  - * $Id: IRangeTest.cpp,v 1.5 2001/07/19 20:45:15 tng Exp $
  + * $Id: IRangeTest.cpp,v 1.6 2001/11/23 16:18:54 tng Exp $
    */
   
   
  @@ -79,7 +79,7 @@
   
   #define TASSERT(c) tassert((c), __FILE__, __LINE__)
   
  -void tassert(bool c, char *file, int line)
  +void tassert(bool c, const char *file, int line)
   {
       if (!c)
           printf("Failure.  Line %d,   file %s\n", line, file);
  
  
  
  1.4       +4 -1      xml-xerces/c/tests/IDom/ITraversal/ITraversal.cpp
  
  Index: ITraversal.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/IDom/ITraversal/ITraversal.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ITraversal.cpp	2001/07/19 20:45:16	1.3
  +++ ITraversal.cpp	2001/11/23 16:18:54	1.4
  @@ -66,6 +66,9 @@
   
   /**
    * $Log: ITraversal.cpp,v $
  + * Revision 1.4  2001/11/23 16:18:54  tng
  + * Elimiate compiler warning: Warning: String literal converted to char* in formal argument file in call to tassert(bool, char*, int).
  + *
    * Revision 1.3  2001/07/19 20:45:16  tng
    * Add some test cases in the tests folder to sanityTest.pl
    *
  @@ -90,7 +93,7 @@
   
   #define TASSERT(c) tassert((c), __FILE__, __LINE__)
   
  -void tassert(bool c, char *file, int line)
  +void tassert(bool c, const char *file, int line)
   {
       if (!c)
           printf("Failure.  Line %d,   file %s\n", line, file);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org