Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
// Test the return items of calendar is sorted
let name = "calendar";
let items = Intl.supportedValuesOf(name);
assertEquals([...items].sort(), items,
"return value of Intl.supportedValuesOf('" + name + "') should be sorted");

View File

@ -0,0 +1,12 @@
// Copyright 2021 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.
// Test the return items of calendar fit 'type'
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
Intl.supportedValuesOf("calendar").forEach(
function(calendar) {
assertTrue(regex.test(calendar),
"Intl.supportedValuesOf('calendar') return " + calendar +
" which does not meet 'type: alphanum{3,8}(sep alphanum{3,8})*'");
});

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
// Test the return items of collation is sorted
let name = "collation";
let items = Intl.supportedValuesOf(name);
assertEquals([...items].sort(), items,
"return value of Intl.supportedValuesOf('" + name + "') should be sorted");

View File

@ -0,0 +1,12 @@
// Copyright 2021 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.
// Test the return items of collation fit 'type'
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
Intl.supportedValuesOf("collation").forEach(
function(collation) {
assertTrue(regex.test(collation),
"Intl.supportedValuesOf('collation') return " + collation +
" which does not meet 'type: alphanum{3,8}(sep alphanum{3,8})*'");
});

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
// Test the return items of currency is sorted
let name = "currency";
let items = Intl.supportedValuesOf(name);
assertEquals([...items].sort(), items,
"return value of Intl.supportedValuesOf('" + name + "') should be sorted");

View File

@ -0,0 +1,12 @@
// Copyright 2021 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.
// Test the return items of currency fit 'type'
let regex = /^[A-Z]{3}$/;
Intl.supportedValuesOf("currency").forEach(
function(currency) {
assertTrue(regex.test(currency),
"Intl.supportedValuesOf('currency') return " + currency +
" which does not meet 'alpha{3}'");
});

View File

@ -0,0 +1,18 @@
// Copyright 2021 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.
// Chrome filter out data of algorithm numberingSystems so we need to test none
// of them got returned.
let name = "numberingSystem";
let items = Intl.supportedValuesOf(name);
function verifyNoAlgorithm(nu) {
assertTrue(items.indexOf(nu) < 0, "should not return '" + nu + "' which is algorithmic");
}
["armn", "armnlow", "cyrl", "ethi", "finance", "geor", "grek", "greklow",
"hans", "hansfin", "hant", "hantfin", "hebr", "japn", "japnfin",
"roman", "romanlow", "taml", "traditio"].forEach(function(nu) {
verifyNoAlgorithm(nu);
});

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
// Test the return items of numberingSystem is sorted
let name = "numberingSystem";
let items = Intl.supportedValuesOf(name);
assertEquals([...items].sort(), items,
"return value of Intl.supportedValuesOf('" + name + "') should be sorted");

View File

@ -0,0 +1,12 @@
// Copyright 2021 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.
// Test the return items of numberingSystem fit 'type'
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
Intl.supportedValuesOf("numberingSystem").forEach(
function(numberingSystem) {
assertTrue(regex.test(numberingSystem),
"Intl.supportedValuesOf('numberingSystem') return " + numberingSystem +
" which does not meet 'type: alphanum{3,8}(sep alphanum{3,8})*'");
});

View File

@ -0,0 +1,10 @@
// Copyright 2021 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.
// Test invalid keys
["calendars", "collations", "currencies", "numberingSystems", "timeZones", "units",
1, 0.3, true, false, {}, [] ].forEach(
function(key) {
assertThrows(() => Intl.supportedValuesOf(key), RangeError);
});

View File

@ -0,0 +1,5 @@
// Copyright 2021 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.
assertEquals("supportedValuesOf", Intl.supportedValuesOf.name);

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
let descriptor = Object.getOwnPropertyDescriptor(
Intl, "supportedValuesOf");
assertTrue(descriptor.writable);
assertFalse(descriptor.enumerable);
assertTrue(descriptor.configurable);

View File

@ -0,0 +1,10 @@
// Copyright 2021 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.
// Test valid keys
["calendar", "collation", "currency", "numberingSystem", "timeZone", "unit"].forEach(
function(key) {
assertDoesNotThrow(() => Intl.supportedValuesOf(key));
assertEquals("object", typeof Intl.supportedValuesOf(key));
});

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
// Test the return items of timeZone is sorted
let name = "timeZone";
let items = Intl.supportedValuesOf(name);
assertEquals([...items].sort(), items,
"return value of Intl.supportedValuesOf('" + name + "') should be sorted");

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
// Test the return items of unit is sorted
let name = "unit";
let items = Intl.supportedValuesOf(name);
assertEquals([...items].sort(), items,
"return value of Intl.supportedValuesOf('" + name + "') should be sorted");