Index: modules/simpletest/tests/common.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
retrieving revision 1.3
diff -u -r1.3 common.test
--- modules/simpletest/tests/common.test	21 Aug 2008 19:36:38 -0000	1.3
+++ modules/simpletest/tests/common.test	26 Aug 2008 04:38:20 -0000
@@ -1,7 +1,9 @@
 <?php
 // $Id: common.test,v 1.3 2008/08/21 19:36:38 dries Exp $
 
-class CommonFormatSizeTestCase extends DrupalWebTestCase {
+class CommonSizeTestCase extends DrupalWebTestCase {
+  protected $exact_test_cases;
+  protected $rounded_test_cases;
 
   /**
    * Implementation of getInfo().
@@ -18,6 +20,7 @@
    * Implementation of setUp().
    */
   function setUp() {
+    parent::setUp();
     $this->exact_test_cases = array(
       '1 byte'    => 1, // byte
       '1 KB'      => 1000, // kilobyte
@@ -36,11 +39,10 @@
       '67.23 PB'  => 67234178751368124, // petabytes
       '235.35 YB' => 235346823821125814962843827, // yottabytes
     );
-    parent::setUp();
   }
 
   /**
-   * testCommonFormatSize
+   * Check that format_size() returns the expected string.
    */
   function testCommonFormatSize() {
     foreach (array($this->exact_test_cases, $this->rounded_test_cases) as $test_cases) {
@@ -52,6 +54,16 @@
       }
     }
   }
+
+  /**
+   * Check that parse_size() returns the proper byte sizes.
+   */
+  function testCommonParseSize() {
+    foreach ($this->exact_test_cases as $string => $size) {
+      $this->assertEqual($result = parse_size($string), $size,
+        $size . ' == ' . $result . ' (' . $string . ')');
+    }
+  }
 }
 
 /**
