B2G/gecko/storage/test/unit/test_locale_collation.js
/**
 * Compares aActual to aExpected, ensuring that the numbers and orderings of
 * the two arrays' elements are the same.
 *
 * @param aActual
 *        An array of strings retrieved from the database.
 * @param aExpected
 *        An array of strings to which aActual should be equivalent.
 */
Compares aActual to aExpected, ensuring that the numbers and orderings of
the two arrays' elements are the same.

@param aActual
An array of strings retrieved from the database.
@param aExpected
An array of strings to which aActual should be equivalent.
Compares aActual to aExpected ensuring that the numbers and orderings of the two arrays ' elements are the same . @param aActual An array of strings retrieved from the database . @param aExpected An array of strings to which aActual should be equivalent .
function ensureResultsAreCorrect(aActual, aExpected)
{
  print("Actual results:   " + aActual);
  print("Expected results: " + aExpected);
  do_check_eq(aActual.length, aExpected.length);
  for (let i = 0; i < aActual.length; i++)
    do_check_eq(aActual[i], aExpected[i]);
}
function ensureResultsAreCorrect ( aActual , aExpected ) { print ( "Actual results:   " + aActual ) ; print ( "Expected results: " + aExpected ) ; do_check_eq ( aActual . length , aExpected . length ) ; for ( let i = 0 ; i < aActual . length ; i ++ ) do_check_eq ( aActual [ i ] , aExpected [ i ] ) ; }
Compares aActual to aExpected, ensuring that the numbers and orderings of
 the two arrays' elements are the same.
Compares aActual to aExpected ensuring that the numbers and orderings of the two arrays ' elements are the same .