1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/ecma_3/FunExpr/regress-518103.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,27 @@ 1.4 +/* 1.5 + * Any copyright is dedicated to the Public Domain. 1.6 + * http://creativecommons.org/licenses/publicdomain/ 1.7 + */ 1.8 + 1.9 +var BUGNUMBER = 518103; 1.10 +var summary = 'lambda constructor "method" vs. instanceof'; 1.11 +var actual; 1.12 +var expect; 1.13 + 1.14 +printBugNumber(BUGNUMBER); 1.15 +printStatus(summary); 1.16 + 1.17 +var Y = {widget: {}}; 1.18 + 1.19 +Y.widget.DataSource = function () {}; 1.20 +Y.widget.DS_JSArray = function (A) { this.data = A; }; 1.21 +Y.widget.DS_JSArray.prototype = new Y.widget.DataSource(); 1.22 + 1.23 +var J = new Y.widget.DS_JSArray( [ ] ); 1.24 + 1.25 +actual = J instanceof Y.widget.DataSource; 1.26 +expect = true; 1.27 + 1.28 +reportCompare(expect, actual, summary); 1.29 + 1.30 +printStatus("All tests passed!");