Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / tests / Bug_3319_Regression_Test.cpp
blob4cc5b5b8e375b7c45f2913020e7fb8b3d11d4c24
1 /**
2 * @file Bug_3319_Regression_Test.cpp
4 * Reproduces the problems reported in bug 2975:
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3319
6 */
8 #include "ace/ACE.h"
9 #include "test_config.h"
10 #include "ace/Service_Config.h"
11 #include "ace/ARGV.h"
12 #include "ace/Log_Msg.h"
14 int
15 run_main (int, ACE_TCHAR *[])
17 ACE_START_TEST (ACE_TEXT ("Bug_3319_Regression_Test"));
19 ACE_Log_Msg *log_msg = ACE_LOG_MSG;
20 ACE_ARGV args;
21 args.add (ACE_TEXT("MyProgram"), true);
22 int ret = ACE_Service_Config::open(args.argc(), args.argv(),
23 ACE_DEFAULT_LOGGER_KEY,
24 1, 1, 1);
26 if (ACE_OS::strcmp (log_msg->program_name (), ACE_TEXT("MyProgram")) != 0)
28 ACE_ERROR_RETURN ((LM_ERROR,
29 ACE_TEXT ("Program name is not <MyProgram> but <%s>\n"),
30 ACE_Log_Msg::program_name ()),
31 1);
34 ACE_END_TEST;
36 return ret;