fd8c79294f
Update the expected result for intl/number-format/format-currency to match the output of ICU 60/CLDR 32. Disable the test while ICU is rolled to ICU 60.1. This will be enabled once v8 picks up the ICU roll to 60.1. Bug: chromium:766816 Test: intl/numbuer-format/* Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: Id6ffe149e9105ca050c6398d484437e1c88c2794 Reviewed-on: https://chromium-review.googlesource.com/756643 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Jungshik Shin <jshin@chromium.org> Cr-Commit-Position: refs/heads/master@{#49206}
20 lines
764 B
JavaScript
Executable File
20 lines
764 B
JavaScript
Executable File
// Copyright 2015 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Make sure currency formatting is correct (for USD only displays two decimal
|
|
// places, for JPY 0, and for EUR 2).
|
|
|
|
var nf_USD = new Intl.NumberFormat(['en'], {style: 'currency', currency: 'USD'});
|
|
|
|
assertEquals("$54,306.40", nf_USD.format(parseFloat(54306.4047970)));
|
|
|
|
var nf_JPY = new Intl.NumberFormat(['ja'],
|
|
{style: 'currency', currency: 'JPY', currencyDisplay: "code"});
|
|
|
|
assertEquals("JPY54,306", nf_JPY.format(parseFloat(54306.4047970)));
|
|
|
|
var nf_EUR = new Intl.NumberFormat(['pt'], {style: 'currency', currency: 'EUR'});
|
|
|
|
assertEquals("€\u00a01.000,00", nf_EUR.format(1000.00));
|