summaryrefslogtreecommitdiff
path: root/examples/Misc/test_sstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Misc/test_sstring.cpp')
-rw-r--r--examples/Misc/test_sstring.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/Misc/test_sstring.cpp b/examples/Misc/test_sstring.cpp
new file mode 100644
index 00000000000..fb04760c724
--- /dev/null
+++ b/examples/Misc/test_sstring.cpp
@@ -0,0 +1,22 @@
+#include "ace/SString.h"
+// @(#)test_sstring.cpp 1.1 10/18/96
+
+
+int
+main (int argc, char *argv[])
+{
+ ACE_CString s1 ("hello");
+ ACE_CString s2 ("world");
+ ACE_CString s3 ("el");
+ ACE_WString s4 ("hello");
+ ACE_WString s5 ("world");
+ ACE_WString s6 ("el");
+
+ ACE_ASSERT (s1 != s2);
+ ACE_ASSERT (s1.strstr (s2) == -1);
+ ACE_ASSERT (s1.strstr (s2) == -1);
+ ACE_ASSERT (s1.strstr (s3));
+ ACE_ASSERT (s4.strstr (s5) == -1);
+ ACE_ASSERT (s5.strstr (s6));
+ return 0;
+}