WordPress.org

Make WordPress Core

Changeset 1220 in tests


Ignore:
Timestamp:
02/28/2013 04:30:35 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Fix wp_convert_bytes_to_hr() test for 64-bit systems. props soulseekah. see #23626.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/media.php

    r1218 r1220  
    159159
    160160        // now some values around
    161         $this->assertEquals( '1.5009765625GB', wp_convert_bytes_to_hr( $gb + $gb / 2 + $mb ) );
    162         $this->assertEquals( '1022.99902344MB', wp_convert_bytes_to_hr( $gb - $mb - $kb ) );
     161        $this->assertTrue( abs( 1.5009765625 - (float) wp_convert_bytes_to_hr( $gb + $gb / 2 + $mb ) ) < 0.0001 );
     162        $this->assertTrue( abs( 1022.99902344 - (float) wp_convert_bytes_to_hr( $gb - $mb - $kb ) ) < 0.0001 );
    163163
    164164        // edge
Note: See TracChangeset for help on using the changeset viewer.