Merge pull request #112 from jannon/FixFor103

A couple more tests of exisiting functions as object keys
This commit is contained in:
Jannon Frank 2012-04-23 20:25:51 -07:00
commit e35ddfab69
4 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,4 @@
// Simple inheritance model with correct constructor
function Test() {}
function Test2() { Test.call(this); }
Test2.prototype = Object.create(Test.prototype, {constructor: {value: Test2}});

View File

@ -8,5 +8,10 @@ Call(
valueOf: function()
{
return this.id;
},
toString: function()
{
return this.id;
}
});

View File

@ -123,6 +123,7 @@ testFile('test/t/cases/constructstag3.js');
testFile('test/t/cases/constructstag4.js');
testFile('test/t/cases/constructstag5.js');
testFile('test/t/cases/constructortag.js');
testFile('test/t/cases/constructorproperty.js');
testFile('test/t/cases/copyrighttag.js');
testFile('test/t/cases/defaulttag.js');
testFile('test/t/cases/deprecatedtag.js');

View File

@ -0,0 +1,8 @@
(function() {
test('Should not crash when "contructor" property is used in Object.create() parameter', function() {
var docSet = testhelpers.getDocSetFromFile('test/cases/contructorproperty.js');
assert.ok(true);
});
})();