Annotation of embedaddon/php/Zend/tests/double_to_string.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: double to string conversion tests
                      3: --INI--
                      4: precision=14
                      5: --SKIPIF--
                      6: <?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
                      7: --FILE--
                      8: <?php
                      9: 
                     10: $doubles = array(
                     11:        290000000000000000,
                     12:        290000000000000,
                     13:        29000000000000,
                     14:        29000000000000.123123,
                     15:        29000000000000.7123123,
                     16:        29000.7123123,
                     17:        239234242.7123123,
                     18:        0.12345678901234567890,
                     19:        10000000000000,
                     20:        100000000000000,
                     21:        1000000000000000001,
                     22:        100000000000001,
                     23:        10000000000,
                     24:        999999999999999,
                     25:        9999999999999999,
                     26:        (float)0
                     27:        );
                     28: 
                     29: foreach ($doubles as $d) {
                     30:        var_dump((string)$d);
                     31: }
                     32: 
                     33: echo "Done\n";
                     34: ?>
                     35: --EXPECTF--    
                     36: string(7) "2.9E+17"
                     37: string(7) "2.9E+14"
                     38: string(%d) "2%s"
                     39: string(%d) "2%s"
                     40: string(%d) "29%d"
                     41: string(13) "29000.7123123"
                     42: string(15) "239234242.71231"
                     43: string(16) "0.12345678901235"
                     44: string(14) "10000000000000"
                     45: string(7) "1.0E+14"
                     46: string(7) "1.0E+18"
                     47: string(7) "1.0E+14"
                     48: string(11) "10000000000"
                     49: string(7) "1.0E+15"
                     50: string(7) "1.0E+16"
                     51: string(1) "0"
                     52: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>