File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / intl / tests / formatter_format_conv.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:56 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
numfmt_format() with type conversion
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php

function ut_main()
{
    $fmt = ut_nfmt_create( 'en_US', NumberFormatter::DECIMAL );
    $number = 1234567.891234567890000;

    $str_res = ut_nfmt_format ($fmt, $number, NumberFormatter::TYPE_INT32)."\n";
    return $str_res;
}

include_once( 'ut_common.inc' );

// Run the test
ut_run();

?>
--EXPECT--
1,234,567

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