From c129ac8546d3e6c7a0d53f2f52cae618a6e53036 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma <usharma1998@gmail.com> Date: Tue, 18 Sep 2018 02:00:27 +0530 Subject: [PATCH] intl: improve coverage for Intl.NumberFormat Add tests for Intl.NumberFormat.prototype[@@toStringTag]. --- .../prototype/toStringTag/initial-value.js | 14 ++++++++++++++ .../prototype/toStringTag/prop-desc.js | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 test/intl402/NumberFormat/prototype/toStringTag/initial-value.js create mode 100644 test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js diff --git a/test/intl402/NumberFormat/prototype/toStringTag/initial-value.js b/test/intl402/NumberFormat/prototype/toStringTag/initial-value.js new file mode 100644 index 0000000000..71a99695a4 --- /dev/null +++ b/test/intl402/NumberFormat/prototype/toStringTag/initial-value.js @@ -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]' +); diff --git a/test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js b/test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js new file mode 100644 index 0000000000..fdba7a30eb --- /dev/null +++ b/test/intl402/NumberFormat/prototype/toStringTag/prop-desc.js @@ -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 +}); -- GitLab