diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-02-03 22:13:25 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-02-03 22:13:25 +0000 |
commit | 604ec2bf4ff658124ff54d8063c31719d8ae8eed (patch) | |
tree | 1aedee9a52886577e96bbcd27e88033846264a0a | |
parent | a42e0462455b2aa96d0b415c96828702e0efee7b (diff) | |
download | ATCD-604ec2bf4ff658124ff54d8063c31719d8ae8eed.tar.gz |
ChangeLogTag:Sat Feb 3 14:12:36 2001 Darrell Brunsch <brunsch@uci.edu>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 8 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 8 | ||||
-rw-r--r-- | tests/Config_Test.cpp | 121 | ||||
-rw-r--r-- | tests/Config_Test.h | 12 | ||||
-rw-r--r-- | tests/Log_Msg_Test.cpp | 78 |
6 files changed, 131 insertions, 104 deletions
diff --git a/ChangeLog b/ChangeLog index 8958b9ad779..d1b7a4592cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Feb 3 14:12:36 2001 Darrell Brunsch <brunsch@uci.edu> + + * tests/Config_Test.cpp: + * tests/Config_Test.h: + * tests/Log_Msg_Test.cpp: + + Fixed ACE_USES_WCHAR problems. + Fri Feb 02 18:36:42 2001 Steve Huston <shuston@riverace.com> * ace/config-linux-common.h: Added #define ACE_POSIX_AIOCB_PROACTOR diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 8958b9ad779..d1b7a4592cc 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,11 @@ +Sat Feb 3 14:12:36 2001 Darrell Brunsch <brunsch@uci.edu> + + * tests/Config_Test.cpp: + * tests/Config_Test.h: + * tests/Log_Msg_Test.cpp: + + Fixed ACE_USES_WCHAR problems. + Fri Feb 02 18:36:42 2001 Steve Huston <shuston@riverace.com> * ace/config-linux-common.h: Added #define ACE_POSIX_AIOCB_PROACTOR diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 8958b9ad779..d1b7a4592cc 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,11 @@ +Sat Feb 3 14:12:36 2001 Darrell Brunsch <brunsch@uci.edu> + + * tests/Config_Test.cpp: + * tests/Config_Test.h: + * tests/Log_Msg_Test.cpp: + + Fixed ACE_USES_WCHAR problems. + Fri Feb 02 18:36:42 2001 Steve Huston <shuston@riverace.com> * ace/config-linux-common.h: Added #define ACE_POSIX_AIOCB_PROACTOR diff --git a/tests/Config_Test.cpp b/tests/Config_Test.cpp index 84270a8753a..8d0b2ece0c5 100644 --- a/tests/Config_Test.cpp +++ b/tests/Config_Test.cpp @@ -10,7 +10,7 @@ // // = DESCRIPTION // This is a test that makes sure various classes in -// <ACE_Configuration> work correctly. +// <ACE_Configuration> work correctly. // // = AUTHOR // Michael Searles <msearles@base16.com> and Chris Hafey <chafey@stentor.com> @@ -32,28 +32,28 @@ test (ACE_Configuration *config) ACE_Configuration_Section_Key testsection; if (config->open_section (root, - "test", + ACE_TEXT ("test"), 1, testsection)) return -2; // Set some values. else if (config->set_string_value (testsection, - "stvalue", - "stvaluetest")) + ACE_TEXT ("stvalue"), + ACE_TEXT ("stvaluetest"))) return -3; else if (config->remove_value (testsection, - "stvalue")) + ACE_TEXT ("stvalue"))) return -4; else if (config->set_string_value (testsection, - "stvalue", - "stvaluetest")) + ACE_TEXT ("stvalue"), + ACE_TEXT ("stvaluetest"))) return -3; else if (config->set_integer_value (testsection, - "intvalue", + ACE_TEXT ("intvalue"), 42)) return -4; @@ -63,7 +63,7 @@ test (ACE_Configuration *config) data[i] = i + 128; if (config->set_binary_value (testsection, - "binvalue", + ACE_TEXT ("binvalue"), data, 80)) return -5; @@ -72,7 +72,7 @@ test (ACE_Configuration *config) ACE_TString stvalue; if (config->get_string_value (testsection, - "stvalue", + ACE_TEXT ("stvalue"), stvalue)) return -6; else if (stvalue != "stvaluetest") @@ -81,7 +81,7 @@ test (ACE_Configuration *config) u_int intvalue; if (config->get_integer_value (testsection, - "intvalue", + ACE_TEXT ("intvalue"), intvalue)) return -8; else if (intvalue != 42) @@ -91,7 +91,7 @@ test (ACE_Configuration *config) u_int length = 0; if (config->get_binary_value (testsection, - "binvalue", + ACE_TEXT ("binvalue"), (void*&) data_out, length)) return -10; @@ -145,17 +145,17 @@ test (ACE_Configuration *config) ACE_Configuration_Section_Key test4; if (config->open_section (testsection, - "test2", + ACE_TEXT ("test2"), 1, test2)) return -16; else if (config->open_section (testsection, - "test3", + ACE_TEXT ("test3"), 1, test3)) return -17; else if (config->open_section (testsection, - "test4", + ACE_TEXT ("test4"), 1, test4)) return -18; @@ -167,11 +167,11 @@ test (ACE_Configuration *config) index, name)) { - if (name == "test2") + if (name == ACE_TEXT ("test2")) count++; - else if (name == "test3") + else if (name == ACE_TEXT ("test3")) count++; - else if (name == "test4") + else if (name == ACE_TEXT ("test4")) count++; index++; } @@ -181,20 +181,20 @@ test (ACE_Configuration *config) // Remove a subsection if (config->remove_section (testsection, - "test2", + ACE_TEXT ("test2"), 0)) return -20; // Try to remove it again if (!config->remove_section (testsection, - "test2", + ACE_TEXT ("test2"), 0)) return -21; // Try to remove the testsection root, it should fail since it still // has subkeys if (!config->remove_section (root, - "test", + ACE_TEXT ("test"), 0)) return -22; @@ -202,20 +202,20 @@ test (ACE_Configuration *config) ACE_Configuration_Section_Key result; if (config->open_section (root, - "test", + ACE_TEXT ("test"), 0, result)) return -23; // Now test the recursive remove. if (config->remove_section (root, - "test", + ACE_TEXT ("test"), 1)) return -24; // Make sure its not there if (!config->open_section (root, - "test", + ACE_TEXT ("test"), 0, testsection)) return -25; @@ -232,7 +232,7 @@ test_io (ACE_Configuration *config) ACE_Configuration_Section_Key test; if (config->open_section(root, - "test", + ACE_TEXT ("test"), 1, test)) return -1; @@ -240,44 +240,44 @@ test_io (ACE_Configuration *config) ACE_TString value ("string value"); if (config->set_string_value (test, - "stvalue", + ACE_TEXT ("stvalue"), value)) return -2; else if (config->set_string_value (test, - "stvalue1", + ACE_TEXT ("stvalue1"), value)) return -3; else if (config->set_integer_value (test, - "intvalue", + ACE_TEXT ("intvalue"), 42)) return -4; ACE_Configuration_Section_Key test2; if (config->open_section (test, - "test2", + ACE_TEXT ("test2"), 1, test2)) return -5; else if (config->set_string_value (test2, - "2stvalue", + ACE_TEXT ("2stvalue"), value)) return -6; else if (config->set_string_value (test2, - "2stvalue1", + ACE_TEXT ("2stvalue1"), value)) return -7; else if (config->set_integer_value (test2, - "2intvalue", + ACE_TEXT ("2intvalue"), 42)) return -8; // Export it to a file - if(config->export_config ("config.ini")) + if(config->export_config (ACE_TEXT ("config.ini"))) return -9; // reimport - if (config->import_config ("config.ini")) + if (config->import_config (ACE_TEXT ("config.ini"))) return -10; return 0; @@ -290,7 +290,7 @@ run_tests (void) // test win32 registry implementation. HKEY root = ACE_Configuration_Win32Registry::resolve_key (HKEY_LOCAL_MACHINE, - "Software\\ACE\\test"); + ACE_TEXT ("Software\\ACE\\test")); if (!root) return -1; @@ -320,10 +320,10 @@ run_tests (void) } // Test persistent heap version - ACE_OS::unlink ("test.reg"); + ACE_OS::unlink (ACE_TEXT ("test.reg")); ACE_Configuration_Heap pers_config; - if (pers_config.open ("test.reg")) + if (pers_config.open (ACE_TEXT ("test.reg"))) return 0; { int result = test (&pers_config); @@ -356,33 +356,35 @@ Config_Test::read_config (void) { if (m_ConfigurationHeap.open () == 0) { - if (m_ConfigurationHeap.import_config_as_strings ("Config_Test.ini") == 0) + if (m_ConfigurationHeap.import_config_as_strings (ACE_TEXT ("Config_Test.ini")) == 0) { ACE_Configuration_Section_Key root = m_ConfigurationHeap.root_section (); // Process [network] section ACE_Configuration_Section_Key NetworkSection; - if (m_ConfigurationHeap.open_section (root, "network", 1, + if (m_ConfigurationHeap.open_section (root, + ACE_TEXT ("network"), + 1, NetworkSection) == 0) { this->get_section_integer (NetworkSection, - "TimeToLive", + ACE_TEXT ("TimeToLive"), &m_nTimeToLive, 1, 20); this->get_section_boolean (NetworkSection, - "Delay", + ACE_TEXT ("Delay"), &m_bDelay); this->get_section_string (NetworkSection, - "DestIPAddress", + ACE_TEXT ("DestIPAddress"), m_pszDestIPAddress, TEST_MAX_STRING); this->get_section_integer (NetworkSection, - "DestPort", + ACE_TEXT ("DestPort"), &m_nDestPort, 0, 65535); this->get_section_integer (NetworkSection, - "ReconnectInterval", + ACE_TEXT ("ReconnectInterval"), &m_nReconnectInterval, 0, 65535); @@ -392,28 +394,29 @@ Config_Test::read_config (void) ACE_Configuration_Section_Key LoggerSection; if (m_ConfigurationHeap.open_section (root, - "logger", 1, + ACE_TEXT ("logger"), + 1, LoggerSection) == 0) { - this->get_section_string (LoggerSection, - "Heading", + this->get_section_string (LoggerSection, + ACE_TEXT ("Heading"), m_pszHeading, TEST_MAX_STRING); this->get_section_integer (LoggerSection, - "TraceLevel", + ACE_TEXT ("TraceLevel"), &m_nTraceLevel, 1, 20); this->get_section_string (LoggerSection, - "Justification", + ACE_TEXT ("Justification"), m_pszJustification, TEST_MAX_STRING); this->get_section_string (LoggerSection, - "LogFilePath", + ACE_TEXT ("LogFilePath"), m_pszLogFilePath, TEST_MAX_STRING); this->get_section_string (LoggerSection, - "TransactionFilePath", + ACE_TEXT ("TransactionFilePath"), m_pszTransactionFilePath, TEST_MAX_STRING); } @@ -436,7 +439,7 @@ Config_Test::get_section_string (ACE_Configuration_Section_Key& SectionKey, ACE_OS::strncpy (pszVariable, StringValue.c_str (), nMaxLength); - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s = %s\n"), pszName, pszVariable)); @@ -452,7 +455,7 @@ Config_Test::get_section_integer (ACE_Configuration_Section_Key& SectionKey, { ACE_TString StringValue; ACE_TCHAR pszString[30]; - ACE_OS::strcpy(pszString, "0"); + ACE_OS::strcpy(pszString, ACE_TEXT ("0")); int IntegerValue = 0; if (m_ConfigurationHeap.get_string_value (SectionKey, @@ -463,7 +466,7 @@ Config_Test::get_section_integer (ACE_Configuration_Section_Key& SectionKey, StringValue.c_str (), 30); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("%s = %s\n"), + "%s = %s\n", pszName, pszString)); } @@ -483,8 +486,8 @@ Config_Test::get_section_boolean (ACE_Configuration_Section_Key& SectionKey, int* pVariable) { ACE_TString StringValue; - char pszString[10]; - ACE_OS::strcpy (pszString, "0"); + ACE_TCHAR pszString[10]; + ACE_OS::strcpy (pszString, ACE_TEXT ("0")); if (m_ConfigurationHeap.get_string_value (SectionKey, pszName, @@ -494,7 +497,7 @@ Config_Test::get_section_boolean (ACE_Configuration_Section_Key& SectionKey, StringValue.c_str (), 10); for (ACE_TCHAR* pSrc = pszString; - *pSrc != '\0'; + *pSrc != ACE_TEXT ('\0'); pSrc++) // Convert to uppercase if (islower (*pSrc)) @@ -506,10 +509,10 @@ Config_Test::get_section_boolean (ACE_Configuration_Section_Key& SectionKey, pszString)); if (ACE_OS::strcmp (pszString, - "TRUE") == 0) + ACE_TEXT ("TRUE")) == 0) *pVariable = 1; else if (ACE_OS::strcmp (pszString, - "FALSE") == 0) + ACE_TEXT ("FALSE")) == 0) *pVariable = 0; } } diff --git a/tests/Config_Test.h b/tests/Config_Test.h index b12ba76ed4e..c46d141b21f 100644 --- a/tests/Config_Test.h +++ b/tests/Config_Test.h @@ -30,15 +30,15 @@ class Config_Test int m_nTimeToLive; int m_bDelay; - char m_pszDestIPAddress[TEST_MAX_STRING]; + ACE_TCHAR m_pszDestIPAddress[TEST_MAX_STRING]; int m_nDestPort; int m_nReconnectInterval; - char m_pszLogFilePath[TEST_MAX_STRING]; - char m_pszTransactionFilePath[TEST_MAX_STRING]; - char m_pszHeading[TEST_MAX_STRING]; + ACE_TCHAR m_pszLogFilePath[TEST_MAX_STRING]; + ACE_TCHAR m_pszTransactionFilePath[TEST_MAX_STRING]; + ACE_TCHAR m_pszHeading[TEST_MAX_STRING]; int m_nTraceLevel; - char m_pszJustification[TEST_MAX_STRING]; + ACE_TCHAR m_pszJustification[TEST_MAX_STRING]; public: Config_Test (void) { } @@ -48,7 +48,7 @@ public: private: void get_section_string (ACE_Configuration_Section_Key& SectionKey, const ACE_TCHAR *pszName, - char *pszVariable, + ACE_TCHAR *pszVariable, int nMaxLength); void get_section_integer (ACE_Configuration_Section_Key& SectionKey, const ACE_TCHAR *pszName, diff --git a/tests/Log_Msg_Test.cpp b/tests/Log_Msg_Test.cpp index 507a76e4d2b..cffc6454f92 100644 --- a/tests/Log_Msg_Test.cpp +++ b/tests/Log_Msg_Test.cpp @@ -32,7 +32,7 @@ static void cleanup (void) { ACE_DEBUG ((LM_INFO, - ACE_TEXT ("cleanup hook (%P)!\n"))); + "cleanup hook (%P)!\n")); } static void @@ -88,7 +88,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("Logger::log->%s\n"), + "Logger::log->%s\n", log_record.msg_data ())); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -100,7 +100,7 @@ Logger::log (ACE_Log_Record &log_record) } else { - char verbose_msg[ACE_Log_Record::MAXVERBOSELOGMSGLEN]; + ACE_TCHAR verbose_msg[ACE_Log_Record::MAXVERBOSELOGMSGLEN]; int result = log_record.format_msg (ACE_LOG_MSG->local_host (), ACE_LOG_MSG->flags (), verbose_msg); @@ -108,7 +108,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("Logger::log->%s\n"), + "Logger::log->%s\n", verbose_msg)); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -130,20 +130,20 @@ test_callbacks (void) { // This message should show up in stderr. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) first message\n"))); + "(%t) first message\n")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) second message\n"))); + "(%t) second message\n")); ACE_LOG_MSG->set_flags (ACE_Log_Msg::MSG_CALLBACK); // This message should not show up anywhere since no callback object // has been specified. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) third message\n"))); + "(%t) third message\n")); // Create a callback object and make it "verbose". Logger logger; @@ -154,28 +154,28 @@ test_callbacks (void) // This message should show up via the Logger callback. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) forth message\n"))); + "(%t) forth message\n")); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); // This message should show up via the Logger callback (somewhat // verbosely). ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) fifth message\n"))); + "(%t) fifth message\n")); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE); // This message should show up via the Logger callback (really // verbosely). ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) sixth message\n"))); + "(%t) sixth message\n")); logger.verbose (0); // This message should show up via the Logger callback (not // verbosely). ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) seventh message\n"))); + "(%t) seventh message\n")); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); @@ -183,12 +183,12 @@ test_callbacks (void) // The one from the Logger callback will not be verbose, but the one // from stderr should be verbose. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) eighth message\n"))); + "(%t) eighth message\n")); ACE_LOG_MSG->msg_callback (0); } static void -test_log_msg_features (const char *program) +test_log_msg_features (const ACE_TCHAR *program) { // Note that the default behavior is to log to STDERR... @@ -204,7 +204,7 @@ test_log_msg_features (const char *program) if (ACE_LOG_MSG->op_status () == -1 && ACE_LOG_MSG->errnum () == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("op_status and errnum work!\n"))); + "op_status and errnum work!\n")); else ACE_ERROR ((LM_ERROR, "op_status and errnum failed!\n")); @@ -222,7 +222,7 @@ test_log_msg_features (const char *program) // Exercise many different combinations of OSTREAM. ACE_DEBUG ((LM_INFO, - ACE_TEXT ("%10f, %*s%s = %d\n"), + "%10f, %*s%s = %d\n", 3.1416 * counter++, 8, "", @@ -233,7 +233,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_INFO, - ACE_TEXT ("%10f, %*s%s = %d\n"), + "%10f, %*s%s = %d\n", 3.1416 * counter, 8, "", @@ -244,7 +244,7 @@ test_log_msg_features (const char *program) // The next two messages shouldn't print. ACE_DEBUG ((LM_INFO, - ACE_TEXT ("%10f, %*s%s = %d\n"), + "%10f, %*s%s = %d\n", 3.1416 * counter, 8, "", @@ -252,7 +252,7 @@ test_log_msg_features (const char *program) 10000 * counter++)); ACE_DEBUG ((LM_INFO, - ACE_TEXT ("%10f, %*s%s = %d\n"), + "%10f, %*s%s = %d\n", 3.1416 * counter, 8, "", @@ -261,7 +261,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); ACE_DEBUG ((LM_INFO, - ACE_TEXT ("%10f, %*s%s = %d\n"), + "%10f, %*s%s = %d\n", 3.1416 * counter, 8, "", @@ -282,9 +282,9 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->priority_mask (priority_mask); ACE_DEBUG ((LM_INFO, - ACE_TEXT ("This LM_INFO message should not print!\n"))); + "This LM_INFO message should not print!\n")); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("This LM_DEBUG message should not print!\n"))); + "This LM_DEBUG message should not print!\n")); ACE_SET_BITS (priority_mask, LM_INFO); @@ -292,18 +292,18 @@ test_log_msg_features (const char *program) ACE_Log_Msg::PROCESS); ACE_DEBUG ((LM_INFO, - ACE_TEXT ("This LM_INFO message should print!\n"))); + "This LM_INFO message should print!\n")); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("This LM_DEBUG message should not print!\n"))); + "This LM_DEBUG message should not print!\n")); ACE_CLR_BITS (priority_mask, LM_INFO); ACE_LOG_MSG->priority_mask (priority_mask, ACE_Log_Msg::PROCESS); ACE_DEBUG ((LM_INFO, - ACE_TEXT ("This LM_INFO message should not print!\n"))); + "This LM_INFO message should not print!\n")); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("This LM_DEBUG message should not print!\n"))); + "This LM_DEBUG message should not print!\n")); } static int @@ -311,20 +311,20 @@ test_ostream (void) { // This message should show up in the log file. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT( "first message\n"))); + "first message\n")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("second message\n"))); + "second message\n")); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) // Create a persistent store. - const char *filename = "output"; - ofstream myostream (filename, ios::out | ios::trunc); + const ACE_TCHAR *filename = ACE_TEXT ("output"); + ofstream myostream (ACE_TEXT_ALWAYS_CHAR (filename), ios::out | ios::trunc); // Check for errors. if (myostream.bad ()) @@ -335,7 +335,7 @@ test_ostream (void) // This message should show up in the ostream. ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("fourth message\n"))); + "fourth message\n")); ACE_FILE_Connector connector; ACE_FILE_IO file; @@ -347,7 +347,7 @@ test_ostream (void) // Set the ostream back to NULL to prevent "later functions using myostream". ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("connect failed for %p\n"), + "connect failed for %p\n", filename), 1); } @@ -363,7 +363,7 @@ test_ostream (void) // Set the ostream back to NULL to prevent "later functions using myostream". ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("get_info failed on %p\n"), + "get_info failed on %p\n", filename), -1); } @@ -384,7 +384,7 @@ test_ostream (void) // Set the ostream back to NULL to prevent "later functions using myostream". ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Read %d bytes, rather than expected %d bytes\n"), + "Read %d bytes, rather than expected %d bytes\n", size, info.size_), -1); @@ -396,7 +396,7 @@ test_ostream (void) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("%s"), + "%s", buffer)); #endif /* ACE_LACKS_IOSTREAM_TOTALLY */ @@ -404,7 +404,7 @@ test_ostream (void) // This message should show up in stderr and the ostream (without // ACE_LACKS_IOSTREAM_TOTALLY). ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("fifth message\n"))); + "fifth message\n")); return 0; } @@ -412,24 +412,24 @@ test_ostream (void) // Main function. int -main (int, char *argv[]) +main (int, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Log_Msg_Test")); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("**** running ostream test\n"))); + "**** running ostream test\n")); // Test the <ACE_Log_Msg> abstraction wrt writing to stderr and to a // file. test_ostream (); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("**** running callback test\n"))); + "**** running callback test\n")); // Test the <ACE_Log_Msg> callback mechanism. test_callbacks (); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("**** running features test\n"))); + "**** running features test\n")); // Test various features of the <ACE_Log_Msg>. test_log_msg_features (argv[0]); |