ComparisonFailure.js revision 33d85edf47749fa345d7b636b9b4b9d0d0386f44
/**
* ComparisonFailure is subclass of Error that is thrown whenever
* a comparison between two values fails. It provides mechanisms to retrieve
* both the expected and actual value.
*
* @param {String} message The message to display when the error occurs.
* @param {Object} expected The expected value.
* @param {Object} actual The actual value that caused the assertion to fail.
* @namespace YUITest
* @extends AssertionError
* @class ComparisonFailure
* @constructor
*/
//call superclass
/**
* The expected value.
* @type Object
* @property expected
*/
/**
* The actual value.
* @type Object
* @property actual
*/
/**
* The name of the error that occurred.
* @type String
* @property name
*/
this.name = "ComparisonFailure";
};
//inherit from YUITest.AssertionError
//restore constructor
/**
* Returns a fully formatted error for an assertion failure. This message
* provides information about the expected and actual values.
* @method getMessage
* @return {String} A string describing the error.
*/
};