Public Member Functions | |
virtual void | characters (const ACEXML_Char *ch, size_t start, size_t length ACEXML_ENV_ARG_DECL) |
const ACEXML_Char * | get_test_string (void) |
Static Private Attributes | |
static const ACEXML_Char * | test_string_ |
Definition at line 18 of file ContentHandler_Test.cpp.
void Basic_Content_Tester::characters | ( | const ACEXML_Char * | ch, | |
size_t | start, | |||
size_t length | ACEXML_ENV_ARG_DECL | |||
) | [virtual] |
Receive notification of character data.
Reimplemented from ACEXML_DefaultHandler.
Definition at line 41 of file ContentHandler_Test.cpp.
References ACE_ERROR, ACE_TEXT, ACEXML_THROW, LM_ERROR, and ACE_OS::strlen().
00044 { 00045 static int already_called = 0; 00046 static const ACEXML_Char *expect = 00047 ACE_TEXT ("Example\nd'internationalisation"); 00048 00049 if (already_called) 00050 { 00051 ACEXML_THROW (ACEXML_SAXException 00052 (ACE_TEXT ("characters() called too much\n"))); 00053 } 00054 already_called = 1; 00055 00056 size_t expected_len = ACE_OS::strlen (expect); 00057 if (length != expected_len) 00058 { 00059 ACE_ERROR ((LM_ERROR, 00060 ACE_TEXT ("characters() expected len %u (%*s); ") 00061 ACE_TEXT ("got %u (%*s)\n"), 00062 expected_len, expected_len, ch + start, 00063 length, length, ch + start)); 00064 ACEXML_THROW (ACEXML_SAXException (ACE_TEXT ("Functionality failure"))); 00065 } 00066 return; 00067 }
const ACEXML_Char* Basic_Content_Tester::get_test_string | ( | void | ) | [inline] |
Definition at line 28 of file ContentHandler_Test.cpp.
References test_string_.
00029 { return Basic_Content_Tester::test_string_; }
const ACEXML_Char * Basic_Content_Tester::test_string_ [static, private] |
Initial value:
ACE_TEXT ("d'internationalisation</translation>")
Definition at line 32 of file ContentHandler_Test.cpp.
Referenced by get_test_string().