diff options
Diffstat (limited to 'tests/Pipe_Test.cpp')
-rw-r--r-- | tests/Pipe_Test.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp index a00ca243da0..47dda893c3a 100644 --- a/tests/Pipe_Test.cpp +++ b/tests/Pipe_Test.cpp @@ -27,13 +27,8 @@ ACE_RCSID(tests, Pipe_Test, "$Id$") -// Indicates whether we should close the pipe or not. static int close_pipe = 1; - -// Indicates whether we're running as the child or the parent. static int child_process = 0; - -// Number of iterations to run the test. static int iterations = ACE_MAX_ITERATIONS; // Explain usage and exit. @@ -47,11 +42,10 @@ print_usage_and_die (void) } // Parse the command-line arguments and set options. - static void parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("dci:")); + ACE_Get_Arg_Opt<ACE_TCHAR> get_opt (argc, argv, ACE_TEXT("dci:")); int c; @@ -73,19 +67,14 @@ parse_args (int argc, ACE_TCHAR *argv[]) } } -// Consolidate the ACE_Pipe initializations. - static void open (ACE_Pipe &pipe, const char *name) { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("opening %C\n"), name)); - int result = pipe.open (); - - ACE_ASSERT (result != -1); - result = pipe.read_handle () != ACE_INVALID_HANDLE - && pipe.write_handle () != ACE_INVALID_HANDLE; - ACE_ASSERT (result == 1); + ACE_ASSERT (pipe.open () != -1); + ACE_ASSERT (pipe.read_handle () != ACE_INVALID_HANDLE + && pipe.write_handle () != ACE_INVALID_HANDLE); if (close_pipe) pipe.close (); |