diff options
Diffstat (limited to 'js/src/tests/test262/annexB/language/expressions/typeof/emulates-undefined.js')
-rw-r--r-- | js/src/tests/test262/annexB/language/expressions/typeof/emulates-undefined.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/src/tests/test262/annexB/language/expressions/typeof/emulates-undefined.js b/js/src/tests/test262/annexB/language/expressions/typeof/emulates-undefined.js new file mode 100644 index 0000000000..464a80f84c --- /dev/null +++ b/js/src/tests/test262/annexB/language/expressions/typeof/emulates-undefined.js @@ -0,0 +1,29 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-IsHTMLDDA-internal-slot-typeof +description: > + `typeof` operator returns "undefined" for [[IsHTMLDDA]] object. +info: | + Changes to the typeof Operator + + The following table entry is inserted into Table 35 immediately + preceeding the entry for "Object (implements [[Call]])": + + Type of val: Object (has an [[IsHTMLDDA]] internal slot) + Result: "undefined" +features: [IsHTMLDDA] +---*/ + +var IsHTMLDDA = $262.IsHTMLDDA; + +assert(typeof IsHTMLDDA === "undefined", '=== "undefined"'); +assert.sameValue(typeof IsHTMLDDA, "undefined"); + +assert(typeof IsHTMLDDA !== "object", '!== "object"'); +assert.sameValue(typeof IsHTMLDDA === "object", false, '!== "object"'); + +assert(typeof IsHTMLDDA !== "function", '!== "function"'); +assert.sameValue(typeof IsHTMLDDA === "function", false, '!== "function"'); + +reportCompare(0, 0); |