From a6c1d05ac4fed084fa047e4c52ab2a8c9c2a8aef Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 26 Jun 2018 20:43:05 +0200 Subject: [PATCH] Add some additional tests for @@toStringTag on Intl.Locale. (#1604) --- .../toStringTag/toString-removed-tag.js | 18 ++++++++++++++++++ .../Locale/prototype/toStringTag/toString.js | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 test/intl402/Locale/prototype/toStringTag/toString-removed-tag.js create mode 100644 test/intl402/Locale/prototype/toStringTag/toString.js diff --git a/test/intl402/Locale/prototype/toStringTag/toString-removed-tag.js b/test/intl402/Locale/prototype/toStringTag/toString-removed-tag.js new file mode 100644 index 0000000000..02d9bf7854 --- /dev/null +++ b/test/intl402/Locale/prototype/toStringTag/toString-removed-tag.js @@ -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]"); diff --git a/test/intl402/Locale/prototype/toStringTag/toString.js b/test/intl402/Locale/prototype/toStringTag/toString.js new file mode 100644 index 0000000000..a7218aa1ca --- /dev/null +++ b/test/intl402/Locale/prototype/toStringTag/toString.js @@ -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]");