? sites/default/settings.php
? sites/default/files/.htaccess
? sites/default/files/simpletest
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.56
diff -u -p -r1.56 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	9 Nov 2008 03:07:54 -0000	1.56
+++ modules/simpletest/drupal_web_test_case.php	17 Nov 2008 21:50:32 -0000
@@ -248,6 +248,60 @@ class DrupalWebTestCase {
     return $this->_assert($first !== $second, $message ? $message : t('First value is not identical to second value'), $group);
   }
 
+  /** Check to see if the positive difference is less than $margin.
+   *
+   * More specifically:
+   * @code
+   *   abs($first - $second) < $margin
+   * @endcode
+   *
+   * This function is especially useful when you want to test a floating point
+   * value, since exact floating point comparison seldom works.
+   *
+   * @param $first
+   *   The first value.
+   * @param $second
+   *   The second value.
+   * @param $margin
+   *   The maximum allowed absolute difference between $first and $second.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   The status passed in.
+   */
+  protected function assertWithinMargin($first, $second, $margin, $message = '', $group = 'Other') {
+    return $this->_assert(abs($first - $second) < $margin, $message ? $message : t('The positive difference between first and second value is less than the stated margin'), $group);
+  }
+
+  /** Check to see if the positive difference is more than $margin.
+   *
+   * More specifically:
+   * @code
+   *   abs($first - $second) > $margin
+   * @endcode
+   *
+   * This function is especially useful when you want to test a floating point
+   * value, since exact floating point comparison seldom works.
+   *
+   * @param $first
+   *   The first value.
+   * @param $second
+   *   The second value.
+   * @param $margin
+   *   The minimum allowed absolute difference between $first and $second.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   The status passed in.
+   */
+  protected function assertOutsideMargin($first, $second, $margin, $message = '', $group = 'Other') {
+    return $this->_assert(abs($first - $second) > $margin, $message ? $message : t('The positive difference between first and second value is greater than the stated margin'), $group);
+  }
+
   /**
    * Fire an assertion that is always positive.
    *
