2
* Any copyright is dedicated to the Public Domain.
3
* http://creativecommons.org/licenses/publicdomain/
6
function checkMethod(method) {
9
assertEq(0, 1, "not reached " + method);
11
assertEq(e.message, "method is not a constructor");
15
function checkMethods(proto) {
16
var names = Object.getOwnPropertyNames(proto);
17
for (var i = 0; i < names.length; i++) {
19
if (name == "constructor")
21
var prop = proto[name];
22
if (typeof prop === "function")
27
checkMethod(Function.prototype);
33
Object, Function, Array, String, Boolean, Number, Date, RegExp, Error,
34
EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError,
37
for (var i = 0; i < builtin_ctors.length; i++) {
38
checkMethods(builtin_ctors[i]);
39
checkMethods(builtin_ctors[i].prototype);
43
eval, isFinite, isNaN, parseFloat, parseInt,
44
decodeURI, decodeURIComponent, encodeURI, encodeURIComponent
47
for (var i = 0; i < builtin_funcs.length; i++) {
48
checkMethod(builtin_funcs[i]);
51
if (typeof reportCompare == 'function')
52
reportCompare(0, 0, "ok");