function assertArrayEquals(expected, observed) {
  var v1 = Array.prototype.slice.call(expected);
  var v2 = Array.prototype.slice.call(observed);
  var equal = v1.length == v2.length;
  if (equal) {
    for (var i = 0; i < v1.length; i++) {
      if (v1[i] !== v2[i]) {
        equal = false;
        break;
      }
    }
  }
  if (!equal) {
    var message =
        ['Assertion Failed', 'Observed: ' + v2, 'Expected: ' + v1].join('\n  ');
    throw new Error(message);
  }
}
/**
 * Verifies that the contents of the expected and observed arrays match.
 * @param {!Array} expected The expected result.
 * @param {!Array} observed The actual result.
 */
Verifies that the contents of the expected and observed arrays match.
@param {!Array} expected The expected result.
@param {!Array} observed The actual result.
Verifies that the contents of the expected and observed arrays match . @param { !Array } expected The expected result . @param { !Array } observed The actual result .
function assertArrayEquals(expected, observed) {
  var v1 = Array.prototype.slice.call(expected);
  var v2 = Array.prototype.slice.call(observed);
  var equal = v1.length == v2.length;
  if (equal) {
    for (var i = 0; i < v1.length; i++) {
      if (v1[i] !== v2[i]) {
        equal = false;
        break;
      }
    }
  }
  if (!equal) {
    var message =
        ['Assertion Failed', 'Observed: ' + v2, 'Expected: ' + v1].join('\n  ');
    throw new Error(message);
  }
}
function assertArrayEquals ( expected , observed ) { var v1 = Array . prototype . slice . call ( expected ) ; var v2 = Array . prototype . slice . call ( observed ) ; var equal = v1 . length == v2 . length ; if ( equal ) { for ( var i = 0 ; i < v1 . length ; i ++ ) { if ( v1 [ i ] !== v2 [ i ] ) { equal = false ; break ; } } } if ( ! equal ) { var message = [ 'Assertion Failed' , 'Observed: ' + v2 , 'Expected: ' + v1 ] . join ( '\n  ' ) ; throw new Error ( message ) ; } }
Verifies that the contents of the expected and observed arrays match.
Verifies that the contents of the expected and observed arrays match .