summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-07-18 15:34:31 +0000
committerkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-07-18 15:34:31 +0000
commit42435ca3c2da0774319f2d8cc8170acf5c98fe09 (patch)
tree6969855281a9694601c3bb4eb6ab76d5196f201e
parent29d89e746f51785335512f91c8fc009e0087cf82 (diff)
downloadATCD-42435ca3c2da0774319f2d8cc8170acf5c98fe09.tar.gz
ChangeLogTag: Fri Jul 18 10:29:55 2003 Krishnakumar B <kitty@nospam.invalid.domain>
-rw-r--r--ACEXML/ChangeLog11
-rw-r--r--ACEXML/tests/ContentHandler_Test.cpp27
-rw-r--r--ACEXML/tests/NamespaceSupport_Test.cpp7
3 files changed, 33 insertions, 12 deletions
diff --git a/ACEXML/ChangeLog b/ACEXML/ChangeLog
index 389c9c78259..4c55078d45d 100644
--- a/ACEXML/ChangeLog
+++ b/ACEXML/ChangeLog
@@ -1,3 +1,14 @@
+Fri Jul 18 10:29:55 2003 Krishnakumar B <kitty@nospam.invalid.domain>
+
+ * tests/NamespaceSupport_Test.cpp (ACE_TMAIN): Added
+ initialization of ACEXML_NamespaceSupport so that we don't
+ crash.
+
+ * tests/ContentHandler_Test.cpp: Removed "</xml>" at the end of
+ the ACEXML_StrCharStream. XML is not HTML. Added a print
+ statement to the catch clause so that we know what is happening
+ when exception occurs.
+
Mon Jul 14 18:49:01 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl>
* apps/svcconf/Makefile:
diff --git a/ACEXML/tests/ContentHandler_Test.cpp b/ACEXML/tests/ContentHandler_Test.cpp
index d81ed1bc64e..c1d9f765dfd 100644
--- a/ACEXML/tests/ContentHandler_Test.cpp
+++ b/ACEXML/tests/ContentHandler_Test.cpp
@@ -34,7 +34,7 @@ private:
const ACEXML_Char * Basic_Content_Tester::test_string_ =
ACE_TEXT ("<?xml version=\"1.0\"?>")
ACE_TEXT ("<translation type=\"unfinished\">Example\n")
- ACE_TEXT ("d&apos;internationalisation</translation></xml>");
+ ACE_TEXT ("d&apos;internationalisation</translation>");
void
Basic_Content_Tester::characters (const ACEXML_Char *ch,
@@ -73,7 +73,8 @@ ACE_TMAIN (int, ACE_TCHAR *[])
Basic_Content_Tester tester;
ACEXML_StrCharStream *test_stream = 0;
ACE_NEW_RETURN (test_stream, ACEXML_StrCharStream, -1);
- if (test_stream->open (tester.get_test_string (), ACE_TEXT ("test_stream")) < 0)
+ if (test_stream->open (tester.get_test_string (),
+ ACE_TEXT ("test_stream")) < 0)
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unable to create input stream\n")));
return -1;
@@ -82,15 +83,19 @@ ACE_TMAIN (int, ACE_TCHAR *[])
ACEXML_Parser parser;
parser.setContentHandler (&tester);
ACEXML_TRY_NEW_ENV
- {
- parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
- ACEXML_TRY_CHECK;
- }
- ACEXML_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Caught exception.\n")));
- status = 1;
- }
+ {
+ parser.setFeature (ACE_TEXT ("http://xml.org/sax/features/validation"),
+ 0
+ ACEXML_ENV_ARG_PARAMETER);
+ ACEXML_TRY_CHECK;
+ parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
+ ACEXML_TRY_CHECK;
+ }
+ ACEXML_CATCH (ACEXML_SAXException, ex)
+ {
+ ex.print();
+ status = 1;
+ }
ACEXML_ENDTRY;
return status;
}
diff --git a/ACEXML/tests/NamespaceSupport_Test.cpp b/ACEXML/tests/NamespaceSupport_Test.cpp
index 96bcfa7ab30..418969d9c91 100644
--- a/ACEXML/tests/NamespaceSupport_Test.cpp
+++ b/ACEXML/tests/NamespaceSupport_Test.cpp
@@ -5,7 +5,12 @@
int ACE_TMAIN (int, ACE_TCHAR *[])
{
ACEXML_NamespaceSupport xmlns;
-
+ if (xmlns.init() == -1)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Error in initializing namespace support.")));
+ return 1;
+ }
xmlns.pushContext();
xmlns.declarePrefix(ACE_TEXT (""),
ACE_TEXT ("http://www.w3.org/1999/xhtml"));