// Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file.
/*--- description: > Fails if second arg is not a function
---*/
var threw = false;
try { assert.throws(TypeError, null);
} catch(err) {
threw = true; if (err.constructor !== Test262Error) { thrownew Error( 'Expected a Test262Error, but a "' + err.constructor.name + '" was thrown.'
);
}
}
if (threw === false) { thrownew Error('Expected a Test262Error, but no error was thrown.');
}
threw = false;
try { assert.throws(TypeError, {});
} catch(err) {
threw = true; if (err.constructor !== Test262Error) { thrownew Error( 'Expected a Test262Error, but a "' + err.constructor.name + '" was thrown.'
);
}
}
if (threw === false) { thrownew Error('Expected a Test262Error, but no error was thrown.');
}
threw = false;
try { assert.throws(TypeError, "");
} catch(err) {
threw = true; if (err.constructor !== Test262Error) { thrownew Error( 'Expected a Test262Error, but a "' + err.constructor.name + '" was thrown.'
);
}
}
if (threw === false) { thrownew Error('Expected a Test262Error, but no error was thrown.');
}
reportCompare(0, 0);
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.