summaryrefslogtreecommitdiff
path: root/ACE/tests/Arg_Shifter_Test.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/tests/Arg_Shifter_Test.cpp
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/tests/Arg_Shifter_Test.cpp')
-rw-r--r--ACE/tests/Arg_Shifter_Test.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/ACE/tests/Arg_Shifter_Test.cpp b/ACE/tests/Arg_Shifter_Test.cpp
new file mode 100644
index 00000000000..649f8054f46
--- /dev/null
+++ b/ACE/tests/Arg_Shifter_Test.cpp
@@ -0,0 +1,43 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// tests
+//
+// = DESCRIPTION
+// This program exercises the ACE_Arg_Shifter class.
+//
+// = AUTHOR
+// Steve Huston <shuston@riverace.com>
+//
+// ============================================================================
+
+#include "ace/Arg_Shifter.h"
+#include "test_config.h"
+
+ACE_RCSID(tests, Arg_Shifter_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT ("Arg_Shifter_Test"));
+
+ const int test_argc_size = 5;
+ int argl (test_argc_size);
+ const ACE_TCHAR *args[test_argc_size] = {
+ ACE_TEXT ("-known"),
+ ACE_TEXT ("-huh"),
+ ACE_TEXT ("-arg"),
+ ACE_TEXT ("-what"),
+ ACE_TEXT ("arg")
+ };
+
+ ACE_Arg_Shifter shifter (argl, args);
+
+ if (!shifter.is_anything_left ())
+ ACE_ERROR ((LM_ERROR, "is_anything_left() returned 0 at start.\n"));
+
+ ACE_END_TEST;
+ return 0;
+}