B2G/gecko/storage/test/unit/test_statement_wrapper_automatically.js
/**
 * Ensures that the number of rows in our test table is equal to aNumRows.
 * Calls do_check_eq on aNumRows and the value retrieved by SELECT'ing COUNT(*).
 *
 * @param aNumRows
 *        the number of rows our test table should contain
 */
Ensures that the number of rows in our test table is equal to aNumRows.
Calls do_check_eq on aNumRows and the value retrieved by SELECT'ing COUNT(*).

@param aNumRows
the number of rows our test table should contain
Ensures that the number of rows in our test table is equal to aNumRows . Calls do_check_eq on aNumRows and the value retrieved by SELECT ' ing COUNT ( * ) . @param aNumRows the number of rows our test table should contain
function ensureNumRows(aNumRows)
{
  var stmt = createStatement("SELECT COUNT(*) AS number FROM test");
  do_check_true(stmt.step());
  do_check_eq(aNumRows, stmt.row.number);
  stmt.reset();
  stmt.finalize();
}
function ensureNumRows ( aNumRows ) { var stmt = createStatement ( "SELECT COUNT(*) AS number FROM test" ) ; do_check_true ( stmt . step ( ) ) ; do_check_eq ( aNumRows , stmt . row . number ) ; stmt . reset ( ) ; stmt . finalize ( ) ; }
Ensures that the number of rows in our test table is equal to aNumRows.
Ensures that the number of rows in our test table is equal to aNumRows .