www/build/tools/csslint-rhino.js
function (needle, haystack, index, message) {

        //try to find the value in the array
        for (var i=haystack.length; i >= 0; i--){
            if (haystack[i] === needle){
                if (index != i){
                    YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Value exists at index " + i + " but should be at index " + index + "."));
                }
                return;
            }
        }

        //if it makes it here, it wasn't found at all
        YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Value doesn't exist in array."));
    }
function (needle, haystack, index, message) {

        //try to find the value in the array
        for (var i=haystack.length; i >= 0; i--){
            if (haystack[i] === needle){
                if (index != i){
                    YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Value exists at index " + i + " but should be at index " + index + "."));
                }
                return;
            }
        }

        //if it makes it here, it wasn't found at all
        YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Value doesn't exist in array."));
    }
function ( needle , haystack , index , message ) { //try to find the value in the array for ( var i = haystack . length ; i >= 0 ; i -- ) { if ( haystack [ i ] === needle ) { if ( index != i ) { YUITest . Assert . fail ( YUITest . Assert . _formatMessage ( message , "Value exists at index " + i + " but should be at index " + index + "." ) ) ; } return ; } } //if it makes it here, it wasn't found at all YUITest . Assert . fail ( YUITest . Assert . _formatMessage ( message , "Value doesn't exist in array." ) ) ; }
Asserts that the given value is contained in an array at the specified index,
starting from the back of the array.
This uses the triple equals sign so no type cohersion will occur.
@param {Object} needle The value to look for.
@param {Array} haystack The array to search in.
@param {int} index The index at which the value should exist.
@param {String} message (Optional) The message to display if the assertion fails.
@method lastIndexOf
@static
Asserts that the given value is contained in an array at the specified index starting from the back of the array . This uses the triple equals sign so no type cohersion will occur .