summaryrefslogtreecommitdiff
path: root/tests/Env_Value_Test.cpp
diff options
context:
space:
mode:
authorcleeland <cleeland@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-02 16:41:16 +0000
committercleeland <cleeland@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-02 16:41:16 +0000
commit8755d17e357d2bd2e2f86fab37d2cdea7442917f (patch)
tree639c866cf1c22349a1bba83573a8ca603f0757eb /tests/Env_Value_Test.cpp
parent4c8380f5b797b2eb26c18e338afc007fd70e2f38 (diff)
downloadATCD-8755d17e357d2bd2e2f86fab37d2cdea7442917f.tar.gz
* tests/Env_Value_Test.cpp (main): Changed the definition of the
TEST_THIS macro to be all on one line. While ugly, this helps in locating the line when ACE_ASSERT fails, since allowing the macro to have multiple lines skews the line # reported by ACE_ASSERT.
Diffstat (limited to 'tests/Env_Value_Test.cpp')
-rw-r--r--tests/Env_Value_Test.cpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/tests/Env_Value_Test.cpp b/tests/Env_Value_Test.cpp
index fd06451d0f3..1754bfcf0e3 100644
--- a/tests/Env_Value_Test.cpp
+++ b/tests/Env_Value_Test.cpp
@@ -14,26 +14,21 @@
//
// ============================================================================
-// main () has three arguments, so we can't use
-// ACE_HAS_NONSTATIC_OBJECT_MANAGER. We don't need it, anyways.
-#include "ace/inc_user_config.h"
-#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
-# undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
-#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
-
#include "test_config.h"
#include "ace/OS.h"
#include "ace/Process.h"
#include "ace/Env_Value_T.h"
int
-main (int argc, char *[], char* envp[])
+main (int argc, char *argv[], char* environ[])
{
if (argc == 1)
{
// No arguments means we're the initial test
ACE_Process_Options options (1);
- options.setenv (envp);
+ options.setenv (environ);
+
+ char* const* envargv;
options.command_line ("Env_Value_Test run_as_test");
@@ -47,16 +42,10 @@ main (int argc, char *[], char* envp[])
else
{
// In this case we're the child
- ACE_START_TEST ("Env_Value_Test");
-
-#define TEST_THIS(type,varname,defval,expval) \
- do { \
- ACE_Env_Value<type> val(varname, (defval));\
- ACE_ASSERT (val == (expval)); \
- } while (0)
-
- ;
+ ACE_START_TEST ("Env_Value");
+#define TEST_THIS(type,varname,defval,expval) do { ACE_Env_Value<type> val(varname, (defval)); ACE_ASSERT (val == (expval)); } while (0)
+
TEST_THIS (int, "TEST_VALUE_POSITIVE", 4, 10);
TEST_THIS (double, "TEST_VALUE_POSITIVE", -1.0, 10.2);
TEST_THIS (unsigned long, "TEST_VALUE_POSITIVE", 0, 10);
@@ -73,7 +62,7 @@ main (int argc, char *[], char* envp[])
ACE_END_TEST;
}
-
+
return 0;
}