diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
commit | a7c03cabf931b077d70c6f80ec02c7728a429f49 (patch) | |
tree | 61d38d262d43ac77fc2ad94c9e7e850cd5607622 /tests/Log_Msg_Test.cpp | |
parent | 2aa7b10780ad7c670f588dce4ec341351a0646aa (diff) | |
download | ATCD-a7c03cabf931b077d70c6f80ec02c7728a429f49.tar.gz |
ChangeLogTag:Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'tests/Log_Msg_Test.cpp')
-rw-r--r-- | tests/Log_Msg_Test.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/tests/Log_Msg_Test.cpp b/tests/Log_Msg_Test.cpp index 82cae74bda8..d98e1b1d06f 100644 --- a/tests/Log_Msg_Test.cpp +++ b/tests/Log_Msg_Test.cpp @@ -31,7 +31,7 @@ static void cleanup (void) { ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("cleanup hook (%P)!\n"))); + ACE_TEXT ("cleanup hook (%P)!\n"))); } static void @@ -87,7 +87,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Logger::log->%s\n"), + ACE_TEXT ("Logger::log->%s\n"), log_record.msg_data ())); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -107,7 +107,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Logger::log->%s\n"), + ACE_TEXT ("Logger::log->%s\n"), verbose_msg)); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -129,20 +129,20 @@ test_callbacks (void) { // This message should show up in stderr. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) first message\n"))); + ACE_TEXT ("(%t) first message\n"))); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) second message\n"))); + ACE_TEXT ("(%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, - ASYS_TEXT ("(%t) third message\n"))); + ACE_TEXT ("(%t) third message\n"))); // Create a callback object and make it "verbose". Logger logger; @@ -153,28 +153,28 @@ test_callbacks (void) // This message should show up via the Logger callback. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) forth message\n"))); + ACE_TEXT ("(%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, - ASYS_TEXT ("(%t) fifth message\n"))); + ACE_TEXT ("(%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, - ASYS_TEXT ("(%t) sixth message\n"))); + ACE_TEXT ("(%t) sixth message\n"))); logger.verbose (0); // This message should show up via the Logger callback (not // verbosely). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) seventh message\n"))); + ACE_TEXT ("(%t) seventh message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); @@ -182,7 +182,7 @@ 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, - ASYS_TEXT ("(%t) eighth message\n"))); + ACE_TEXT ("(%t) eighth message\n"))); ACE_LOG_MSG->msg_callback (0); } @@ -203,7 +203,7 @@ test_log_msg_features (const char *program) if (ACE_LOG_MSG->op_status () == -1 && ACE_LOG_MSG->errnum () == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("op_status and errnum work!\n"))); + ACE_TEXT ("op_status and errnum work!\n"))); else ACE_ERROR ((LM_ERROR, "op_status and errnum failed!\n")); @@ -221,7 +221,7 @@ test_log_msg_features (const char *program) // Exercise many different combinations of OSTREAM. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter++, 8, "", @@ -232,7 +232,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -243,7 +243,7 @@ test_log_msg_features (const char *program) // The next two messages shouldn't print. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -251,7 +251,7 @@ test_log_msg_features (const char *program) 10000 * counter++)); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -260,7 +260,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -281,9 +281,9 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->priority_mask (priority_mask); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should not print!\n"))); + ACE_TEXT ("This LM_INFO message should not print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); ACE_SET_BITS (priority_mask, LM_INFO); @@ -291,18 +291,18 @@ test_log_msg_features (const char *program) ACE_Log_Msg::PROCESS); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should print!\n"))); + ACE_TEXT ("This LM_INFO message should print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("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, - ASYS_TEXT ("This LM_INFO message should not print!\n"))); + ACE_TEXT ("This LM_INFO message should not print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); } static int @@ -310,13 +310,13 @@ test_ostream (void) { // This message should show up in the log file. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT( "first message\n"))); + ACE_TEXT( "first message\n"))); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("second message\n"))); + ACE_TEXT ("second message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); @@ -334,7 +334,7 @@ test_ostream (void) // This message should show up in the ostream. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("fourth message\n"))); + ACE_TEXT ("fourth message\n"))); ACE_FILE_Connector connector; ACE_FILE_IO file; @@ -343,20 +343,20 @@ test_ostream (void) if (connector.connect (file, ACE_FILE_Addr (filename)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("connect failed for %p\n"), + ACE_TEXT ("connect failed for %p\n"), filename), 1); // Unlink this file right away so that it is automatically removed // when the process exits. else if (ACE_OS::unlink (filename) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unlink failed for %p\n"), + ACE_TEXT ("unlink failed for %p\n"), filename), 1); ACE_FILE_Info info; if (file.get_info (info) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("get_info failed on %p\n"), + ACE_TEXT ("get_info failed on %p\n"), filename), -1); @@ -373,7 +373,7 @@ test_ostream (void) info.size_); if (size != info.size_) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Read %d bytes, rather than expected %d bytes\n"), + ACE_TEXT ("Read %d bytes, rather than expected %d bytes\n"), size, info.size_), -1); @@ -384,7 +384,7 @@ test_ostream (void) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s"), + ACE_TEXT ("%s"), buffer)); #endif /* ACE_LACKS_IOSTREAM_TOTALLY */ @@ -392,7 +392,7 @@ test_ostream (void) // This message should show up in stderr and the ostream (without // ACE_LACKS_IOSTREAM_TOTALLY). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("fifth message\n"))); + ACE_TEXT ("fifth message\n"))); return 0; } @@ -402,23 +402,23 @@ test_ostream (void) int main (int, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Log_Msg_Test")); + ACE_START_TEST (ACE_TEXT ("Log_Msg_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running ostream test\n"))); + ACE_TEXT ("**** running ostream test\n"))); // Test the <ACE_Log_Msg> abstraction wrt writing to stderr and to a // file. test_ostream (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running callback test\n"))); + ACE_TEXT ("**** running callback test\n"))); // Test the <ACE_Log_Msg> callback mechanism. test_callbacks (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running features test\n"))); + ACE_TEXT ("**** running features test\n"))); // Test various features of the <ACE_Log_Msg>. test_log_msg_features (argv[0]); |