michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributors: Christian Holler and Jason Orendorff michael@0: */ michael@0: michael@0: function C(){} michael@0: C.prototype = 1; michael@0: try { michael@0: Object.defineProperty(C, "prototype", {get: function() { throw 0; }}); michael@0: actual = "no exception"; michael@0: } catch (exc) { michael@0: actual = exc.name; michael@0: } michael@0: new C; // don't assert michael@0: assertEq(actual, "TypeError"); michael@0: reportCompare(0, 0, "ok");