Skip to content

Commit 5472df5

Browse files
iamstoliskassifar
authored andcommitted
Setting an explicit locale in locale-sensitive tests.
(cherry picked from commit e1088f7) Fix copyright date
1 parent cd4e442 commit 5472df5

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

graal-js/src/com.oracle.truffle.js.parser/src/com/oracle/truffle/js/parser/date/DateParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

graal-js/src/com.oracle.truffle.js.test/js/GR-53722.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
/*
2-
* Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
66
*/
77

88
/**
99
* Regression test of the handling of SafeInteger by PluralRules.
10+
*
11+
* @option locale=en
1012
*/
1113

1214
load('assert.js');

graal-js/src/com.oracle.truffle.js.test/src/com/oracle/truffle/js/test/interop/ForeignBoxedObjectTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -48,6 +48,7 @@
4848
import org.graalvm.polyglot.Context;
4949
import org.junit.Test;
5050

51+
import com.oracle.truffle.js.runtime.JSContextOptions;
5152
import com.oracle.truffle.js.test.JSTest;
5253
import com.oracle.truffle.js.test.polyglot.ForeignBoxedObject;
5354
import com.oracle.truffle.js.test.polyglot.ForeignNull;
@@ -84,7 +85,7 @@ public void testForeignBoxedString() {
8485

8586
@Test
8687
public void testForeignBoxedNumber() {
87-
try (Context context = JSTest.newContextBuilder().build()) {
88+
try (Context context = JSTest.newContextBuilder().option(JSContextOptions.LOCALE_NAME, "en").build()) {
8889
context.getBindings("js").putMember("obj", ForeignBoxedObject.createNew(42));
8990
assertTrue(context.eval(ID, "typeof Object(obj) === 'object'").asBoolean());
9091
assertTrue(context.eval(ID, "typeof obj.valueOf === 'function'").asBoolean());

graal-js/src/com.oracle.truffle.js.test/src/com/oracle/truffle/js/test/runtime/ZoneRulesProviderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -86,6 +86,7 @@ public void testIntl() {
8686

8787
private static Context newContext(boolean intl) {
8888
return JSTest.newContextBuilder().//
89+
option(JSContextOptions.LOCALE_NAME, "en").//
8990
option(JSContextOptions.TIME_ZONE_NAME, "Europe/Prague").//
9091
option(JSContextOptions.INTL_402_NAME, Boolean.toString(intl)).//
9192
option(JSContextOptions.ZONE_RULES_BASED_TIME_ZONES_NAME, "true").//

0 commit comments

Comments
 (0)