diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-10 20:14:34 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-10 20:14:34 +0000 |
commit | 8a996c69ad5ce5e47bce725f3b1ebe2378ef8d7b (patch) | |
tree | a6fc69d760a2fdb032a1dc1f8d00d5e101a09849 /tests/SString_Test.cpp | |
parent | 08f7761a4e9cc2f7fea455441edf45fe284c1292 (diff) | |
download | ATCD-main_to_poa_merge_8.tar.gz |
This commit was manufactured by cvs2svn to create tagmain_to_poa_merge_8
'main_to_poa_merge_8'.
Diffstat (limited to 'tests/SString_Test.cpp')
-rw-r--r-- | tests/SString_Test.cpp | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/tests/SString_Test.cpp b/tests/SString_Test.cpp deleted file mode 100644 index 6574ba166a5..00000000000 --- a/tests/SString_Test.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// ============================================================================ -// $Id$ - -// -// = LIBRARY -// tests -// -// = FILENAME -// SString_Test.cpp -// -// = DESCRIPTION -// This is a simple test that illustrates the use of ACE_CString -// and ACE_WString. No command line arguments are needed to run -// the test. -// -// = AUTHOR -// Prashant Jain -// -// ============================================================================ - -#include "test_config.h" -#include "ace/SString.h" - -int -main (int, char *[]) -{ - ACE_START_TEST ("SString_Test"); - - { - ACE_CString s1 ("hello"); - ACE_CString s2 ("world"); - ACE_CString s3 ("el"); - - ACE_ASSERT (s1 != s2); - ACE_ASSERT (s1.strstr (s2) == -1); - ACE_ASSERT (s1.strstr (s3)); - - ACE_ASSERT (s1.find (s3) == 1); - ACE_ASSERT (s1.find (s3, 2) == ACE_CString::npos); - ACE_ASSERT (s1.find (s2) == ACE_CString::npos); - ACE_ASSERT (s1.find ('o') == 4); - ACE_ASSERT (s1.rfind ('l') == 3); - ACE_ASSERT (s1.rfind ('l', 3) == 2); - } - - { - ACE_SString s1 ("hello"); - ACE_SString s2 ("world"); - ACE_SString s3 ("el"); - - ACE_ASSERT (s1 != s2); - ACE_ASSERT (s1.strstr (s2) == -1); - ACE_ASSERT (s1.strstr (s3)); - - ACE_ASSERT (s1.find (s3) == 1); - ACE_ASSERT (s1.find (s3, 2) == ACE_SString::npos); - ACE_ASSERT (s1.find (s2) == ACE_SString::npos); - ACE_ASSERT (s1.find ('o') == 4); - ACE_ASSERT (s1.rfind ('l') == 3); - ACE_ASSERT (s1.rfind ('l', 3) == 2); - } - - { - ACE_WString s1 ("hello"); - ACE_WString s2 ("world"); - ACE_WString s3 ("el"); - - ACE_ASSERT (s1 != s2); - ACE_ASSERT (s1.strstr (s2) == -1); - ACE_ASSERT (s1.strstr (s3)); - - ACE_ASSERT (s1.find (s3) == 1); - ACE_ASSERT (s1.find (s3, 2) == ACE_WString::npos); - ACE_ASSERT (s1.find (s2) == ACE_WString::npos); - ACE_ASSERT (s1.find ('o') == 4); - ACE_ASSERT (s1.rfind ('l') == 3); - ACE_ASSERT (s1.rfind ('l', 3) == 2); - } - - ACE_END_TEST; - return 0; -} |