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/09 15:44:02 UTC

cvs commit: xml-xerces/c/tests/DOM/DOMIDTest DOMIDTest.cpp

tng         01/11/09 06:44:02

  Modified:    c/tests/DOM/DOMIDTest DOMIDTest.cpp
  Log:
  Pulled the hardcoded "encoding" out of the document itself and made it a #define to make it easier to support other encodings.  Fixed by Carolyn Weiss.
  
  Revision  Changes    Path
  1.7       +16 -20    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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DOMIDTest.cpp	2001/10/26 11:55:56	1.6
  +++ DOMIDTest.cpp	2001/11/09 14:44:02	1.7
  @@ -146,9 +146,23 @@
   //  Small in-memory test document
   //
   // ---------------------------------------------------------------------------
  -#ifdef OS390
  +//
  +//      NOTE: If your encoding is not ascii you will need to change
  +//            the following #define for DOMIDTEST_ENCODING
  +//
  +
  +
  +#ifndef DOMIDTEST_ENCODING
  +   #if defined(OS390)
  +       #define DOMIDTEST_ENCODING "ibm-1047-s390"
  +   #else
  +       #define DOMIDTEST_ENCODING "ascii"
  +   #endif
  +#endif /* ifndef DOMIDTEST_ENCODING */
  +
  +
       static const char*  TestDoc1 =
  -"<?xml version='1.0' encoding='ibm-1047-s390'?>     \n\
  +"<?xml version='1.0' encoding='" DOMIDTEST_ENCODING "'?>     \n\
   <!DOCTYPE doc [                             \n\
   <!ELEMENT doc  (elA | elB)*>                \n\
   <!ELEMENT elA             (#PCDATA)>        \n\
  @@ -163,24 +177,6 @@
       <elA id='a003'/>                        \n\
   </doc>                                      \n\
   ";
  -#else
  -    static const char*  TestDoc1 =
  -"<?xml version='1.0' encoding='ascii'?>     \n\
  -<!DOCTYPE doc [                             \n\
  -<!ELEMENT doc  (elA | elB)*>                \n\
  -<!ELEMENT elA             (#PCDATA)>        \n\
  -<!ELEMENT elB             (#PCDATA)>        \n\
  -<!ATTLIST elA    id ID    #IMPLIED>         \n\
  -<!ATTLIST elB    id CDATA #IMPLIED>         \n\
  -]>                                          \n\
  -                                            \n\
  -<doc>                                       \n\
  -    <elA id='a001'/>                        \n\
  -    <elB id='a002'/>                        \n\
  -    <elA id='a003'/>                        \n\
  -</doc>                                      \n\
  -";
  -#endif
   
   int main()
   {
  
  
  

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