v8/test/intl/default_locale.js
Frank Tang a6d2fe4009 [Intl] Remove GetDefaultLocale
Simplified test for default locale under test/intl
Remove GetDefaultLocale from runtime
Move Intl::DefaultLocale from intl-object.h to
internal function inside intl-object.cc

Bug: v8:5751
Change-Id: I885abf30ff33d5213ee99c07ac1e92d3c5065d8b
Reviewed-on: https://chromium-review.googlesource.com/c/1358022
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58081}
2018-12-07 06:27:42 +00:00

18 lines
1.1 KiB
JavaScript

// Copyright 2018 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.
// Environment Variables: LC_ALL=de
assertEquals("de", (new Intl.Collator([])).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(['xx'])).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(undefined)).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(undefined, {usage: 'sort'})).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(undefined, {usage: 'search'})).resolvedOptions().locale);
assertEquals("de", (new Intl.DateTimeFormat([])).resolvedOptions().locale);
assertEquals("de", (new Intl.DateTimeFormat(['xx'])).resolvedOptions().locale);
assertEquals("de", (new Intl.NumberFormat([])).resolvedOptions().locale);
assertEquals("de", (new Intl.NumberFormat(['xx'])).resolvedOptions().locale);
assertEquals("de", (new Intl.v8BreakIterator([])).resolvedOptions().locale);
assertEquals("de", (new Intl.v8BreakIterator(['xx'])).resolvedOptions().locale);