diff options
Diffstat (limited to 'ASNMP/tests')
-rw-r--r-- | ASNMP/tests/test_config.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/ASNMP/tests/test_config.h b/ASNMP/tests/test_config.h index cec49951d40..b548ae88c22 100644 --- a/ASNMP/tests/test_config.h +++ b/ASNMP/tests/test_config.h @@ -8,10 +8,10 @@ // = AUTHOR // Prashant Jain <pjain@cs.wustl.edu>, Tim Harrison // <harrison@cs.wustl.edu>, and David Levine <levine@cs.wustl.edu> -// +// // ============================================================================ -#if !defined (ACE_TEST_CONFIG_H) +#ifndef ACE_TEST_CONFIG_H #define ACE_TEST_CONFIG_H #include <iostream.h> @@ -120,11 +120,11 @@ do {\ #define ACE_INIT_LOG(NAME) \ char temp[BUFSIZ]; \ ACE_OS::sprintf (temp, "%s%s%s", \ - ACE_LOG_DIRECTORY_A, \ - ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR_A), \ - ".log"); \ + ACE_LOG_DIRECTORY_A, \ + ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR_A), \ + ".log"); \ ACE_DEBUG ((LM_DEBUG, "Deleting old log file %s (if any)\n\n", temp)); \ - ACE_OS::unlink (temp); + ACE_OS::unlink (temp); const int ACE_NS_MAX_ENTRIES = 1000; @@ -153,23 +153,23 @@ private: static ACE_Test_Output ace_file_stream; ACE_Test_Output::ACE_Test_Output (void) -{ +{ } -ACE_Test_Output::~ACE_Test_Output (void) -{ +ACE_Test_Output::~ACE_Test_Output (void) +{ } -int +int ACE_Test_Output::set_output (const char *filename, int append) { char temp[BUFSIZ]; // Ignore the error value since the directory may already exist. ACE_OS::mkdir (ACE_LOG_DIRECTORY_A); - ACE_OS::sprintf (temp, "%s%s%s", - ACE_LOG_DIRECTORY_A, - ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR_A), - ".log"); + ACE_OS::sprintf (temp, "%s%s%s", + ACE_LOG_DIRECTORY_A, + ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR_A), + ".log"); int flags = ios::out; if (append) @@ -179,24 +179,24 @@ ACE_Test_Output::set_output (const char *filename, int append) if (this->output_file_.bad ()) return -1; - ACE_LOG_MSG->msg_ostream (ace_file_stream.output_file ()); - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER ); - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); + ACE_LOG_MSG->msg_ostream (ace_file_stream.output_file ()); + ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER ); + ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); return 0; } ofstream * -ACE_Test_Output::output_file (void) -{ - return &this->output_file_; +ACE_Test_Output::output_file (void) +{ + return &this->output_file_; } - -void -ACE_Test_Output::close (void) -{ - this->output_file_.flush (); - this->output_file_.close (); + +void +ACE_Test_Output::close (void) +{ + this->output_file_.flush (); + this->output_file_.close (); } void @@ -206,9 +206,9 @@ randomize (int array[], size_t size) for (i = 0; i < size; i++) array [i] = i; - + ACE_OS::srand (ACE_OS::time (0L)); - + // Generate an array of random numbers from 0 .. size - 1. for (i = 0; i < size; i++) |