Commit 0ae1669e authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

jscript/tests: Add more tests for setting prototype to different builtin types.

parent ba1f47a7
......@@ -1887,6 +1887,24 @@ ok(!tmp.hasOwnProperty("y"), "tmp has 'y' property");
ok(!tmp.propertyIsEnumerable("y"), "tmp has 'y' property enumerable");
ok(tmp.toString() == "[object Object]", "tmp.toString returned " + tmp.toString());
testNullPrototype.prototype = 42;
tmp = new testNullPrototype();
ok(tmp.hasOwnProperty("x"), "tmp does not have 'x' property");
ok(!tmp.hasOwnProperty("y"), "tmp has 'y' property");
ok(tmp.toString() == "[object Object]", "tmp.toString returned " + tmp.toString());
testNullPrototype.prototype = true;
tmp = new testNullPrototype();
ok(tmp.hasOwnProperty("x"), "tmp does not have 'x' property");
ok(!tmp.hasOwnProperty("y"), "tmp has 'y' property");
ok(tmp.toString() == "[object Object]", "tmp.toString returned " + tmp.toString());
testNullPrototype.prototype = "foobar";
tmp = new testNullPrototype();
ok(tmp.hasOwnProperty("x"), "tmp does not have 'x' property");
ok(!tmp.hasOwnProperty("y"), "tmp has 'y' property");
ok(tmp.toString() == "[object Object]", "tmp.toString returned " + tmp.toString());
function do_test() {}
function nosemicolon() {} nosemicolon();
function () {} nosemicolon();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment