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.
{ static int already_called = 0; static const ACEXML_Char *expect = ACE_TEXT ("Example\nd'internationalisation"); if (already_called) { ACEXML_THROW (ACEXML_SAXException (ACE_TEXT ("characters() called too much\n"))); } already_called = 1; size_t expected_len = ACE_OS::strlen (expect); if (length != expected_len) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("characters() expected len %u (%*s); ") ACE_TEXT ("got %u (%*s)\n"), expected_len, expected_len, ch + start, length, length, ch + start)); ACEXML_THROW (ACEXML_SAXException (ACE_TEXT ("Functionality failure"))); } return; }
const ACEXML_Char* Basic_Content_Tester::get_test_string | ( | void | ) | [inline] |
Definition at line 28 of file ContentHandler_Test.cpp.
{ return Basic_Content_Tester::test_string_; }
const ACEXML_Char * Basic_Content_Tester::test_string_ [static, private] |
ACE_TEXT ("d'internationalisation</translation>")
Definition at line 32 of file ContentHandler_Test.cpp.