summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_3/FunExpr/regress-518103.js
blob: 70bab0d5725d739d7c1be7928d82bcda20f758b5 (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
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

var BUGNUMBER = 518103;
var summary = 'lambda constructor "method" vs. instanceof';
var actual;
var expect;

printBugNumber(BUGNUMBER);
printStatus(summary);

var Y = {widget: {}};

Y.widget.DataSource = function () {};
Y.widget.DS_JSArray = function (A) { this.data = A; };
Y.widget.DS_JSArray.prototype = new Y.widget.DataSource();

var J = new Y.widget.DS_JSArray( [ ] );

actual = J instanceof Y.widget.DataSource;
expect = true;

reportCompare(expect, actual, summary);

printStatus("All tests passed!");