ComparisonFailure.js revision d0199bcbfc68b65683c19c4e3e0c38e238142e7e
/**
* 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 Test
* @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.
*/
};