src/aria/jsunit/Assert.js
function (value, optMsg) {
                this._assertCount++;
                this._totalAssertCount++;
                if (value !== true) {
                    var msg = "Assert #" + this._assertCount + " failed";
                    if (optMsg) {
                        msg += " : " + optMsg;
                    }

                    this.raiseFailure(msg);

                    if (console && ariaUtilsType.isFunction(console.trace)) {
                        console.assert(false, "Stack trace for failed Assert #" + this._assertCount + " in test : ["
                                + this._currentTestName + "]");
                    }

                    // raise an exception to stop subsequent
                    throw {
                        name : this.ASSERT_FAILURE,
                        message : msg
                    };
                }
            }
function (value, optMsg) {
                this._assertCount++;
                this._totalAssertCount++;
                if (value !== true) {
                    var msg = "Assert #" + this._assertCount + " failed";
                    if (optMsg) {
                        msg += " : " + optMsg;
                    }

                    this.raiseFailure(msg);

                    if (console && ariaUtilsType.isFunction(console.trace)) {
                        console.assert(false, "Stack trace for failed Assert #" + this._assertCount + " in test : ["
                                + this._currentTestName + "]");
                    }

                    // raise an exception to stop subsequent
                    throw {
                        name : this.ASSERT_FAILURE,
                        message : msg
                    };
                }
            }
function ( value , optMsg ) { this . _assertCount ++ ; this . _totalAssertCount ++ ; if ( value !== true ) { var msg = "Assert #" + this . _assertCount + " failed" ; if ( optMsg ) { msg += " : " + optMsg ; } this . raiseFailure ( msg ) ; if ( console && ariaUtilsType . isFunction ( console . trace ) ) { console . assert ( false , "Stack trace for failed Assert #" + this . _assertCount + " in test : [" + this . _currentTestName + "]" ) ; } // raise an exception to stop subsequent throw { name : this . ASSERT_FAILURE , message : msg } ; } }
Check that value is true - if not a failure will be raised in the test context
@param {Boolean} value the value to test
@param {String} optMsg optional message to add to the failure description
Check that value is true - if not a failure will be raised in the test context