summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2003-07-25 11:15:47 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2003-07-25 11:15:47 +0000
commitf27d35c07a218e9421b2b945e5d3d323c02a7aa0 (patch)
tree515a0091d745f2e783992b23aadc4fed2cdeffb9 /tests
parentb4d95b1d67569c31b1a25ceb0c7b7d8b47360687 (diff)
downloadATCD-f27d35c07a218e9421b2b945e5d3d323c02a7aa0.tar.gz
ChangeLogTag: Fri Jul 25 09:11:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests.bor1
-rw-r--r--tests/UUIDTest.cpp42
2 files changed, 19 insertions, 24 deletions
diff --git a/tests/Tests.bor b/tests/Tests.bor
index 5ea476caecc..8ca9029c4f3 100644
--- a/tests/Tests.bor
+++ b/tests/Tests.bor
@@ -130,6 +130,7 @@ NAMES = \
UPIPE_SAP_Test \
Unbounded_Set_Test_Ex \
Upgradable_RW_Test \
+ UUIDTest \
Vector_Test \
WFMO_Reactor_Test \
XtReactor_Test
diff --git a/tests/UUIDTest.cpp b/tests/UUIDTest.cpp
index 0469b081cbf..3a034e65579 100644
--- a/tests/UUIDTest.cpp
+++ b/tests/UUIDTest.cpp
@@ -13,7 +13,7 @@ public:
};
-int
+int
Tester::init (void)
{
///Initialise the UUID Generator
@@ -21,7 +21,7 @@ Tester::init (void)
return 0;
}
-int
+int
Tester::test (void)
{
// Generate UUID
@@ -31,64 +31,58 @@ Tester::test (void)
"Generated UUID\n %s\n",
uuid_str.c_str ()));
delete uuid;
-
+
// Construct UUID from string
ACE_UUID new_uuid (uuid_str);
ACE_DEBUG ((LM_DEBUG,
"UUID Constructed from above Generated UUID\n %s\n",
new_uuid.to_string ()->c_str ()));
- // Generate UUID with process and thread ids.
+ // Generate UUID with process and thread ids.
ACE_UUID* uuid_with_tp_id = ACE_UUID_GENERATOR::instance ()->generateUUID (0x0001, 0xc0);
ACE_DEBUG ((LM_DEBUG,
"UUID with Thread and Process ID\n %s\n",
uuid_with_tp_id->to_string ()->c_str ()));
-
+
// Construct UUID from string
ACE_UUID new_uuid_with_tp_id (uuid_with_tp_id->to_string ()->c_str ());
ACE_DEBUG ((LM_DEBUG,
"UUID with Thread and Process ID reconstructed from above UUID \n %s\n",
new_uuid_with_tp_id.to_string ()->c_str ()));
delete uuid_with_tp_id;
-
+
return 0;
}
-int run_main(int, char* [])
+int run_main(int, ACE_TCHAR* [])
{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Starting %s test at %D\n"),
- "UUIDTest"));
+ ACE_START_TEST (ACE_TEXT ("UUIDTest"));
Tester tester;
- if (tester.init () == -1)
+ if (tester.init () == -1)
{
-
+
ACE_DEBUG((LM_DEBUG,
"UUIDTest: Tester::init failed\n"));
return -1;
}
-
+
int testRetValue = tester.test();
-
- if (testRetValue == 0)
+
+ if (testRetValue == 0)
{
ACE_DEBUG((LM_DEBUG,
"UUIDTest succeeded\n"));
- }
- else
+ }
+ else
{
ACE_DEBUG((LM_DEBUG,
"UUIDTest failed\n"));
}
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) Ending %s test at %D\n"),
- "UUIDTest"));
- return testRetValue;
-}
-
-
+ ACE_END_TEST;
+ return testRetValue;
+}