summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/PluralRules/prototype/toStringTag/toString-removed-tag.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/intl402/PluralRules/prototype/toStringTag/toString-removed-tag.js')
-rw-r--r--js/src/tests/test262/intl402/PluralRules/prototype/toStringTag/toString-removed-tag.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/PluralRules/prototype/toStringTag/toString-removed-tag.js b/js/src/tests/test262/intl402/PluralRules/prototype/toStringTag/toString-removed-tag.js
new file mode 100644
index 0000000000..02f835ff2f
--- /dev/null
+++ b/js/src/tests/test262/intl402/PluralRules/prototype/toStringTag/toString-removed-tag.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2020 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-intl.pluralrules.prototype-tostringtag
+description: >
+ Object.prototype.toString doesn't special-case neither Intl.PluralRules instances nor its prototype.
+info: |
+ Object.prototype.toString ( )
+
+ [...]
+ 14. Else, let builtinTag be "Object".
+ 15. Let tag be ? Get(O, @@toStringTag).
+ 16. If Type(tag) is not String, set tag to builtinTag.
+ 17. Return the string-concatenation of "[object ", tag, and "]".
+features: [Symbol.toStringTag]
+---*/
+
+delete Intl.PluralRules.prototype[Symbol.toStringTag];
+
+assert.sameValue(Object.prototype.toString.call(Intl.PluralRules.prototype), "[object Object]");
+assert.sameValue(Object.prototype.toString.call(new Intl.PluralRules()), "[object Object]");
+
+reportCompare(0, 0);