diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
commit | a7c03cabf931b077d70c6f80ec02c7728a429f49 (patch) | |
tree | 61d38d262d43ac77fc2ad94c9e7e850cd5607622 /tests/Naming_Test.cpp | |
parent | 2aa7b10780ad7c670f588dce4ec341351a0646aa (diff) | |
download | ATCD-a7c03cabf931b077d70c6f80ec02c7728a429f49.tar.gz |
ChangeLogTag:Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'tests/Naming_Test.cpp')
-rw-r--r-- | tests/Naming_Test.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/tests/Naming_Test.cpp b/tests/Naming_Test.cpp index 60be9098721..8b0a9a752ba 100644 --- a/tests/Naming_Test.cpp +++ b/tests/Naming_Test.cpp @@ -25,6 +25,8 @@ ACE_RCSID(tests, Naming_Test, "$Id$") +#if defined (ACE_HAS_WCHAR) + static char name[BUFSIZ]; static char value[BUFSIZ]; static char type[BUFSIZ]; @@ -37,11 +39,11 @@ print_time (ACE_Profile_Timer &timer, timer.stop (); timer.elapsed_time (et); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n ***** %s ***** \n"), test)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n ***** %s ***** \n"), test)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("time per call = %f usecs\n\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("time per call = %f usecs\n\n"), (et.real_time / double (ACE_NS_MAX_ENTRIES)) * 1000000)); } @@ -154,10 +156,10 @@ test_find (ACE_Naming_Context &ns_context, int sign, int result) { if (type_out) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Name: %s\tValue: %s\tType: %s\n"), + ACE_TEXT ("Name: %s\tValue: %s\tType: %s\n"), name, l_value, type_out)); else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Name: %s\tValue: %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name: %s\tValue: %s\n"), name, l_value)); } @@ -172,12 +174,14 @@ test_find (ACE_Naming_Context &ns_context, int sign, int result) } } +#endif /* ACE_HAS_WCHAR */ + int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - TCHAR temp_file [BUFSIZ]; - ACE_START_TEST (ASYS_TEXT ("Naming_Test")); - + ACE_START_TEST (ACE_TEXT ("Naming_Test")); +#if defined (ACE_HAS_WCHAR) + ACE_TCHAR temp_file [BUFSIZ]; ACE_Naming_Context *ns_context; ACE_NEW_RETURN (ns_context, ACE_Naming_Context, -1); @@ -206,9 +210,9 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_ASSERT (ns_context->open (ACE_Naming_Context::PROC_LOCAL, 1) != -1); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("time to test %d iterations using %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("time to test %d iterations using %s\n"), ACE_NS_MAX_ENTRIES, name_options->use_registry () ? - ASYS_TEXT ("Registry") : ASYS_TEXT ("ACE"))); + ACE_TEXT ("Registry") : ACE_TEXT ("ACE"))); ACE_Profile_Timer timer; @@ -253,6 +257,9 @@ main (int argc, ASYS_TCHAR *argv[]) // since we don't care if the file doesn't exist. ACE_OS::unlink (temp_file); +#else /* ACE_HAS_TCHAR */ + ACE_ERROR ((LM_INFO, ACE_TEXT ("Naming_Test requires wchar_t support to run.\n"))); +#endif /* ACE_HAS_TCHAR */ ACE_END_TEST; return 0; } |