def PassTest(resultfile, resultlog, test):
  """Logs the result of a test started by StartTest(), or a disabled test
  configuration.

  Args:
    resultfile: File object for .cc file that results are written to.
    resultlog: File object for the log file.
    test: An instance of the dictionary returned by StartTest(), a
          configuration from ExtractTestConfigs().
  """
  resultfile.write(GUNIT_TEMPLATE % (
      test['suite_name'], test['name']))

  # The 'started_at' key is only added if a test has been started.
  if 'started_at' in test:
    resultlog.write(LOG_TEMPLATE % (
        test['suite_name'], test['name'],
        test['finished_at'] - test['started_at'],
        test['started_at'], test['finished_at']))