mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
intl: improve coverage for Intl.NumberFormat
Add tests for Intl.NumberFormat.prototype[@@toStringTag].
This commit is contained in:
parent
9271068a83
commit
c129ac8546
14
test/intl402/NumberFormat/prototype/toStringTag/initial-value.js
vendored
Normal file
14
test/intl402/NumberFormat/prototype/toStringTag/initial-value.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (C) 2018 Ujjwal Sharma. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.numberformat.prototype-@@tostringtag
|
||||
description: >
|
||||
Initial value of Intl.NumberFormat.prototype[@@toStringTag] is "Object".
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.NumberFormat.prototype[Symbol.toStringTag], 'Object');
|
||||
assert.sameValue(
|
||||
Object.prototype.toString.call(new Intl.NumberFormat()),
|
||||
'[object Object]'
|
||||
);
|
15
test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js
vendored
Normal file
15
test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2018 Ujjwal Sharma. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.numberformat.prototype-@@tostringtag
|
||||
description: >
|
||||
Tests that Intl.NumberFormat.prototype[@@toStringTag] has the required attributes.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Intl.NumberFormat, Symbol.toStringTag, {
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user