1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * Any copyright is dedicated to the Public Domain.
4 * http://creativecommons.org/licenses/publicdomain/
7 assertEq(undefined, void 0);
9 assertEq(Function.prototype.hasOwnProperty('prototype'), false);
10 assertEq(Function.prototype.prototype, undefined);
13 Object, Function, Array, String, Boolean, Number, Date, RegExp, Error,
14 EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError
17 for (var i = 0; i < builtin_ctors.length; i++) {
18 var c = builtin_ctors[i];
19 assertEq(typeof c.prototype, (c === Function) ? "function" : "object");
20 assertEq(c.prototype.constructor, c);
24 eval, isFinite, isNaN, parseFloat, parseInt,
25 decodeURI, decodeURIComponent, encodeURI, encodeURIComponent
28 for (var i = 0; i < builtin_funcs.length; i++) {
29 assertEq(builtin_funcs[i].hasOwnProperty('prototype'), false);
30 assertEq(builtin_funcs[i].prototype, undefined);
33 var names = Object.getOwnPropertyNames(Math);
34 for (var i = 0; i < names.length; i++) {
35 var m = Math[names[i]];
36 if (typeof m === "function")
37 assertEq(m.prototype, undefined);
40 reportCompare(0, 0, "don't crash");