From d24a19cd8df7b6de5f3a070785d897c9711dee6a Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 13 Apr 2011 09:40:48 +0000 Subject: Wed Apr 13 09:39:09 UTC 2011 Johnny Willemsen * 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 --- ACE/ChangeLog | 12 ++++++++++++ ACE/tests/ACE_Test.cpp | 2 -- ACE/tests/Bug_2434_Regression_Test.cpp | 3 +++ ACE/tests/Bug_3758_Regression_Test.cpp | 2 -- ACE/tests/Date_Time_Test.cpp | 2 -- ACE/tests/Time_Value_Test.cpp | 26 -------------------------- 6 files changed, 15 insertions(+), 32 deletions(-) diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 7d059df5bed..6dbb93e6011 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,15 @@ +Wed Apr 13 09:39:09 UTC 2011 Johnny Willemsen + + * 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 + Wed Apr 13 07:41:31 UTC 2011 Johnny Willemsen * ace/Time_Value.inl: 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::max (); const time_t min_time_t = ACE_Numeric_Limits::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::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::max (); - const time_t min_time_t = ACE_Numeric_Limits::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::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); -- cgit v1.2.1