ShouldFail.js revision 33d85edf47749fa345d7b636b9b4b9d0d0386f44
/**
* ShouldFail is subclass of AssertionError that is thrown whenever
* a test was expected to fail but did not.
*
* @param {String} message The message to display when the error occurs.
* @namespace YUITest
* @extends YUITest.AssertionError
* @class ShouldFail
* @constructor
*/
YUITest.ShouldFail = function (message){
//call superclass
YUITest.AssertionError.call(this, message || "This test should fail but didn't.");
/**
* The name of the error that occurred.
* @type String
* @property name
*/
this.name = "ShouldFail";
};
//inherit from YUITest.AssertionError
YUITest.ShouldFail.prototype = new YUITest.AssertionError();
//restore constructor
YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;