Debian Codegraph @

js/src/tests/test262/language/function-code/10.4.3-1-4-s.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 10.4.3-1-4-s
6 description: this is not coerced to an object in strict mode (boolean)
7 flags: [noStrict]
8 ---*/
9
10 function foo()
11 {
12 'use strict';
13 return typeof(this);
14 }
15
16 function bar()
17 {
18 return typeof(this);
19 }
20
21 assert.sameValue(foo.call(true), 'boolean', 'foo.call(true)');
22 assert.sameValue(bar.call(true), 'object', 'bar.call(true)');
23
24 reportCompare(0, 0);