summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/extensions/uneval/function-bind.js
blob: 263099cf07866cf023397982c1986ca38fc7021c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// |reftest| skip-if(!this.uneval)

/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

var gTestfile = 'function-bind.js';
var BUGNUMBER = 429507;
var summary = "ES5: Function.prototype.bind";

print(BUGNUMBER + ": " + summary);

/**************
 * BEGIN TEST *
 **************/

assertEq((function unbound(){"body"}).bind().toSource(), `function bound() {
    [native code]
}`);

assertEq(uneval((function unbound(){"body"}).bind()), `function bound() {
    [native code]
}`);


/******************************************************************************/

if (typeof reportCompare === "function")
  reportCompare(true, true);

print("All tests passed!");