diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-03-12 09:01:49 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-03-14 18:49:21 +0100 |
commit | 7b48713334469818661fe276cf571de9c7899f2d (patch) | |
tree | 4dbda49ac88db76ce09dc330a0cb587e68e139ba /deps/v8/test/intl/locale | |
parent | 8549ac09b256666cf5275224ec58fab9939ff32e (diff) | |
download | android-node-v8-7b48713334469818661fe276cf571de9c7899f2d.tar.gz android-node-v8-7b48713334469818661fe276cf571de9c7899f2d.tar.bz2 android-node-v8-7b48713334469818661fe276cf571de9c7899f2d.zip |
deps: update V8 to 7.3.492.25
PR-URL: https://github.com/nodejs/node/pull/25852
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/test/intl/locale')
-rw-r--r-- | deps/v8/test/intl/locale/locale-canonicalization.js | 2 | ||||
-rw-r--r-- | deps/v8/test/intl/locale/locale-constructor.js | 8 | ||||
-rw-r--r-- | deps/v8/test/intl/locale/property.js | 22 |
3 files changed, 26 insertions, 6 deletions
diff --git a/deps/v8/test/intl/locale/locale-canonicalization.js b/deps/v8/test/intl/locale/locale-canonicalization.js index 5012537277..cc0478fdb6 100644 --- a/deps/v8/test/intl/locale/locale-canonicalization.js +++ b/deps/v8/test/intl/locale/locale-canonicalization.js @@ -19,6 +19,6 @@ let locale = new Intl.Locale('sr-cyrl-rs-t-ja-u-ca-islamic-x-whatever', { }); let expected = - 'sr-Cyrl-RS-t-ja-u-ca-buddhist-co-phonebk-hc-h23-kf-upper-kn-true-nu-roman-x-whatever'; + 'sr-Cyrl-RS-t-ja-u-ca-buddhist-co-phonebk-hc-h23-kf-upper-kn-nu-roman-x-whatever'; assertEquals(expected, locale.toString()); diff --git a/deps/v8/test/intl/locale/locale-constructor.js b/deps/v8/test/intl/locale/locale-constructor.js index 3da9e291be..bf2510553f 100644 --- a/deps/v8/test/intl/locale/locale-constructor.js +++ b/deps/v8/test/intl/locale/locale-constructor.js @@ -86,9 +86,7 @@ assertThrows( }), Error); -// These don't throw yet, we need to implement language/script/region -// override logic first. -assertDoesNotThrow( +assertThrows( () => new Intl.Locale('en-US', { get language() { throw new Error('foo'); @@ -96,7 +94,7 @@ assertDoesNotThrow( }), Error); -assertDoesNotThrow( +assertThrows( () => new Intl.Locale('en-US', { get script() { throw new Error('foo'); @@ -104,7 +102,7 @@ assertDoesNotThrow( }), Error); -assertDoesNotThrow( +assertThrows( () => new Intl.Locale('en-US', { get region() { throw new Error('foo'); diff --git a/deps/v8/test/intl/locale/property.js b/deps/v8/test/intl/locale/property.js new file mode 100644 index 0000000000..cbe076842f --- /dev/null +++ b/deps/v8/test/intl/locale/property.js @@ -0,0 +1,22 @@ +// Copyright 2019 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. + +// Flags: --harmony-locale + +// Make sure that accessing locale property will return undefined instead of +// crash. + +let locale = new Intl.Locale('sr'); + +assertEquals('sr', locale.toString()); +assertEquals('sr', locale.baseName); +assertEquals('sr', locale.language); +assertEquals(undefined, locale.script); +assertEquals(undefined, locale.region); +assertEquals(false, locale.numeric); +assertEquals(undefined, locale.calendar); +assertEquals(undefined, locale.collation); +assertEquals(undefined, locale.hourCycle); +assertEquals(undefined, locale.caseFirst); +assertEquals(undefined, locale.numberingSystem); |