function checkResult(suffix, generated) {
  const fileName = `test/golden/golden.${suffix}`;
  const goldenContents = fs.readFileSync(fileName);
  // Normalize the line feeds.
  const normalized = goldenContents.toString().replace(/(?:\r\n|\r|\n)/g, '\n');
  assert.equal(generated, normalized);
}
Assert that the generated code matches the golden code for the specified
language.
@param {string} suffix The suffix of the golden file.
@param {string} generated The generated code to compare against the
    golden file.