diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-11-27 03:48:22 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-11-27 03:48:22 +0000 |
commit | 12c6e9309760327c1dc0de516d20c0aa1fe61ef9 (patch) | |
tree | 405fbd33b880a1844b7f44f20cb0a5177fc35092 /tests/Pipe_Test.cpp | |
parent | d4f3bf8e29f87347dad1e7d5ab4773fabb7c82b9 (diff) | |
download | ATCD-12c6e9309760327c1dc0de516d20c0aa1fe61ef9.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests/Pipe_Test.cpp')
-rw-r--r-- | tests/Pipe_Test.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp new file mode 100644 index 00000000000..88e65fc8b88 --- /dev/null +++ b/tests/Pipe_Test.cpp @@ -0,0 +1,40 @@ +#include "ace/Pipe.h" +#include "test_config.h" + +void +open (ACE_Pipe &pipe, const char *name) +{ + if (pipe.open () == 0) + ACE_DEBUG ((LM_DEBUG, "Pipe %s: successful open\n", name)); + else + { + ACE_DEBUG ((LM_DEBUG, "Pipe %s: UNSUCCESSFUL open\n", name)); + if (pipe.read_handle () == ACE_INVALID_HANDLE) + ACE_DEBUG ((LM_DEBUG, "Reader is invalid\n")); + else + ACE_DEBUG ((LM_DEBUG, "Reader is valid\n")); + if (pipe.write_handle () == ACE_INVALID_HANDLE) + ACE_DEBUG ((LM_DEBUG, "Writer is invalid\n")); + else + ACE_DEBUG ((LM_DEBUG, "Writer is valid\n")); + + ACE_OS::exit (-1); + } +} + +int +main (int, char *argv[]) +{ + ACE_START_TEST ("Pipe_Test.cpp"); + + ACE_Pipe a, b, c, d, e; + + ::open (a, "a"); + ::open (b, "b"); + ::open (c, "c"); + ::open (d, "d"); + ::open (e, "e"); + + ACE_END_TEST; + return 0; +} |