diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2011-04-13 09:40:48 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2011-04-13 09:40:48 +0000 |
commit | 95a38049274b944bfd62012db2a138a99173930e (patch) | |
tree | 81c67b0a4700e0e6f849607f4244c87df0c0e5c4 /ACE/tests | |
parent | e0ca46d9b8cf4548b1ee1167bc7a7b7fe3754d46 (diff) | |
download | ATCD-95a38049274b944bfd62012db2a138a99173930e.tar.gz |
Wed Apr 13 09:39:09 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Time_Value_Test.cpp:
* tests/Bug_2434_Regression_Test.cpp:
Overflow problem is part of bugzilla 2434, only do the test there,
that way Time_Value_Test should run in all builds
* tests/ACE_Test.cpp:
* tests/Bug_3758_Regression_Test.cpp:
* tests/Date_Time_Test.cpp:
Layout changes
Diffstat (limited to 'ACE/tests')
-rw-r--r-- | ACE/tests/ACE_Test.cpp | 2 | ||||
-rw-r--r-- | ACE/tests/Bug_2434_Regression_Test.cpp | 3 | ||||
-rw-r--r-- | ACE/tests/Bug_3758_Regression_Test.cpp | 2 | ||||
-rw-r--r-- | ACE/tests/Date_Time_Test.cpp | 2 | ||||
-rw-r--r-- | ACE/tests/Time_Value_Test.cpp | 26 |
5 files changed, 3 insertions, 32 deletions
diff --git a/ACE/tests/ACE_Test.cpp b/ACE/tests/ACE_Test.cpp index d4ff6d98d0c..2acf685c0d4 100644 --- a/ACE/tests/ACE_Test.cpp +++ b/ACE/tests/ACE_Test.cpp @@ -19,8 +19,6 @@ #include "ace/ACE.h" #include "ace/OS_NS_stdlib.h" - - int log2_test (void) { diff --git a/ACE/tests/Bug_2434_Regression_Test.cpp b/ACE/tests/Bug_2434_Regression_Test.cpp index 8f6af24548a..f1bb119e034 100644 --- a/ACE/tests/Bug_2434_Regression_Test.cpp +++ b/ACE/tests/Bug_2434_Regression_Test.cpp @@ -39,6 +39,9 @@ run_main (int, ACE_TCHAR *[]) const time_t max_time_t = ACE_Numeric_Limits<time_t>::max (); const time_t min_time_t = ACE_Numeric_Limits<time_t>::min (); + // test protection against overflows + // ACE_TEST_ASSERT( ACE_Time_Value(max_time_t,ACE_ONE_SECOND_IN_USECS) != ACE_Time_Value(ACE_Numeric_Limits<time_t>::min()) ); + // test saturated result tv1.set (max_time_t - 1, 499999); tv2.set (max_time_t, 999999); // ACE_Time_Value::max_time diff --git a/ACE/tests/Bug_3758_Regression_Test.cpp b/ACE/tests/Bug_3758_Regression_Test.cpp index b114d122817..c6c1819405a 100644 --- a/ACE/tests/Bug_3758_Regression_Test.cpp +++ b/ACE/tests/Bug_3758_Regression_Test.cpp @@ -17,8 +17,6 @@ #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_unistd.h" - - #undef THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL #define THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL(X) \ ((X) \ diff --git a/ACE/tests/Date_Time_Test.cpp b/ACE/tests/Date_Time_Test.cpp index 1dc66b46303..c24384e2800 100644 --- a/ACE/tests/Date_Time_Test.cpp +++ b/ACE/tests/Date_Time_Test.cpp @@ -16,8 +16,6 @@ #include "ace/Date_Time.h" #include "test_config.h" - - static ACE_Date_Time static_dt; // Making sure it doesn't crash. int diff --git a/ACE/tests/Time_Value_Test.cpp b/ACE/tests/Time_Value_Test.cpp index 382eeb05f2c..b8da6088b74 100644 --- a/ACE/tests/Time_Value_Test.cpp +++ b/ACE/tests/Time_Value_Test.cpp @@ -97,32 +97,6 @@ run_main (int, ACE_TCHAR *[]) tv1 *= -10.0; ACE_TEST_ASSERT (tv1 == tv2); - const time_t max_time_t = ACE_Numeric_Limits<time_t>::max (); - const time_t min_time_t = ACE_Numeric_Limits<time_t>::min (); - - // test protection against overflows - // ACE_TEST_ASSERT( ACE_Time_Value(max_time_t,ACE_ONE_SECOND_IN_USECS) != ACE_Time_Value(ACE_Numeric_Limits<time_t>::min()) ); - - // test saturated result - tv1.set (max_time_t - 1, 499999); - tv2.set (max_time_t, 999999); // ACE_Time_Value::max_time - tv1 *= 10.0; - ACE_TEST_ASSERT (tv1 == tv2); - tv1.set (max_time_t - 1, 499999); - tv2.set (min_time_t, -999999); - tv1 *= -10.0; - ACE_TEST_ASSERT (tv1 == tv2); - - // test results near limits - tv1.set ((max_time_t >> 1), 499999); - tv2.set ((-(max_time_t >> 1) << 1), -999998); - tv1 *= -2.0; - ACE_TEST_ASSERT (tv1 == tv2); - tv1.set (max_time_t >> 1, 499999); - tv2.set (((max_time_t >> 1) << 1), 999998); - tv1 *= 2.0; - ACE_TEST_ASSERT (tv1 == tv2); - // Test correct msec() convert; also checks for compile error reported in // Bugzilla 3336. ACE_Time_Value msec_test (42, 555000); |