Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a host-reliant Intl.DateTimeFormat
Ref tc39/ecma402#709 (comment) Passes relevant tests after minor modification: ```sh $ npm run test:test262 -- --extended-tests --run-slow-tests $( find $( find test/test262/test262/ -type d -a '(' -iname '*intl*' -o -iname '*402*' ')' -prune | \ tee /dev/stderr \ ) -iname '*date*' -prune | \ grep -viE 'temporal|\bdate\b|\bsupportedValuesOf\b|\bDisplayName' ) test/test262/test262/test/staging/Intl402 test/test262/test262/test/intl402 test/test262/test262/implementation-contributed/v8/intl test/test262/test262/implementation-contributed/v8/test262/local-tests/test/intl402 > @engine262/[email protected] test:test262 > node --enable-source-maps test/test262/test262.js --extended-tests --run-slow-tests test/test262/test262/test/intl402/DateTimeFormat test/test262/test262/test/intl402/Intl/DateTimeFormat test/test262/test262/implementation-contributed/v8/test262/local-tests/test/intl402/DateTimeFormat engine262 Test Runner Detected 4 CPUs Not running on CI [00:04|: 342|+ 322|- 0|» 20] (68.00/s) $ pushd test/test262/test262/ && git diff; popd diff --git i/harness/testIntl.js w/harness/testIntl.js index 286ccd129e..f674055e2c 100644 --- i/harness/testIntl.js +++ w/harness/testIntl.js @@ -42,7 +42,8 @@ defines: * @param {Function} Constructor the constructor object to test with. */ function testWithIntlConstructors(f) { - var constructors = ["Collator", "NumberFormat", "DateTimeFormat"]; + // engine262 does not yet implement Collator or NumberFormat. + var constructors = [/*"Collator", "NumberFormat",*/ "DateTimeFormat"]; // Optionally supported Intl constructors. // NB: Intl.Locale isn't an Intl service constructor! diff --git i/implementation-contributed/v8/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js w/implementation-contributed/v8/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js index 64845e74a9..bee9c5cf53 100644 --- i/implementation-contributed/v8/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js +++ w/implementation-contributed/v8/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js @@ -11,7 +11,8 @@ includes: [testIntl.js] testWithIntlConstructors(function (Constructor) { var obj, newObj; - if (Constructor === Intl.DateTimeFormat) { + // engine262 does not implement ChainDateTimeFormat (which is normative-optional). + if (false && Constructor === Intl.DateTimeFormat) { obj = new Constructor(); newObj = Intl.DateTimeFormat.call(obj); if (obj !== newObj) { diff --git i/test/intl402/DateTimeFormat/date-time-options.js w/test/intl402/DateTimeFormat/date-time-options.js index 7d9ef93d20..8c8502fc3b 100644 --- i/test/intl402/DateTimeFormat/date-time-options.js +++ w/test/intl402/DateTimeFormat/date-time-options.js @@ -36,6 +36,8 @@ function testWithDateTimeFormat(options, expected) { } function testWithToLocale(f, options, expected) { + // engine262 does not yet implement Intl-integrated Date.prototype.toLocaleString. + return; // expected can be either one subset or an array of possible subsets if (expected.length === undefined) { expected = [expected]; ```
- Loading branch information