mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Add some additional tests for @@toStringTag on Intl.Locale. (#1604)
This commit is contained in:
parent
b4efa8c938
commit
a6c1d05ac4
18
test/intl402/Locale/prototype/toStringTag/toString-removed-tag.js
vendored
Normal file
18
test/intl402/Locale/prototype/toStringTag/toString-removed-tag.js
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Copyright 2018 Igalia, S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-intl.locale.prototype-@@tostringtag
|
||||||
|
description: >
|
||||||
|
Checks Object.prototype.toString with Intl.Locale objects.
|
||||||
|
info: |
|
||||||
|
Intl.Locale.prototype[ @@toStringTag ]
|
||||||
|
|
||||||
|
The initial value of the @@toStringTag property is the string value "Intl.Locale".
|
||||||
|
features: [Intl.Locale, Symbol.toStringTag]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
delete Intl.Locale.prototype[Symbol.toStringTag];
|
||||||
|
|
||||||
|
assert.sameValue(Object.prototype.toString.call(Intl.Locale.prototype), "[object Object]");
|
||||||
|
assert.sameValue(Object.prototype.toString.call(new Intl.Locale("en")), "[object Object]");
|
16
test/intl402/Locale/prototype/toStringTag/toString.js
vendored
Normal file
16
test/intl402/Locale/prototype/toStringTag/toString.js
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2018 Igalia, S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-intl.locale.prototype-@@tostringtag
|
||||||
|
description: >
|
||||||
|
Checks Object.prototype.toString with Intl.Locale objects.
|
||||||
|
info: |
|
||||||
|
Intl.Locale.prototype[ @@toStringTag ]
|
||||||
|
|
||||||
|
The initial value of the @@toStringTag property is the string value "Intl.Locale".
|
||||||
|
features: [Intl.Locale, Symbol.toStringTag]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.sameValue(Object.prototype.toString.call(Intl.Locale.prototype), "[object Intl.Locale]");
|
||||||
|
assert.sameValue(Object.prototype.toString.call(new Intl.Locale("en")), "[object Intl.Locale]");
|
Loading…
x
Reference in New Issue
Block a user