intl: improve coverage for Intl.NumberFormat

Add tests for Intl.NumberFormat.prototype[@@toStringTag].
This commit is contained in:
Ujjwal Sharma 2018-09-18 02:00:27 +05:30 committed by Rick Waldron
parent 9271068a83
commit c129ac8546
2 changed files with 29 additions and 0 deletions

View 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]'
);

View 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
});