parameters: (
          input_api,
          output_api,  # pylint: disable=invalid-name
          source_file_filter)
return_statement: return [
          output_api.PresubmitPromptWarning(
              'WebRTC\'s code should not use '
              'gtest\'s FRIEND_TEST() macro. Include testsupport/gtest_prod_util.h and '
              'use FRIEND_TEST_ALL_PREFIXES() instead.\n' + '\n'.join(problems))
      ]
docstring: Make sure that gtest's FRIEND_TEST() macro is not used, the
    FRIEND_TEST_ALL_PREFIXES() macro from testsupport/gtest_prod_util.h should be
    used instead since that allows for FLAKY_, FAILS_ and DISABLED_ prefixes.
docstring_summary: Make sure that gtest's FRIEND_TEST() macro is not used, the
    FRIEND_TEST_ALL_PREFIXES() macro from testsupport/gtest_prod_util.h should be
    used instead since that allows for FLAKY_, FAILS_ and DISABLED_ prefixes.
docstring_tokens: Make sure that gtest s FRIEND_TEST () macro is not used the FRIEND_TEST_ALL_PREFIXES () macro from testsupport / gtest_prod_util . h should be used instead since that allows for FLAKY_ FAILS_ and DISABLED_ prefixes .
function: def CheckNoFRIEND_TEST(
          input_api,
          output_api,  # pylint: disable=invalid-name
          source_file_filter):
      """Make sure that gtest's FRIEND_TEST() macro is not used, the
    FRIEND_TEST_ALL_PREFIXES() macro from testsupport/gtest_prod_util.h should be
    used instead since that allows for FLAKY_, FAILS_ and DISABLED_ prefixes."""
      problems = []
  
      file_filter = lambda f: (f.LocalPath().endswith(('.cc', '.h')) and
                               source_file_filter(f))
      for f in input_api.AffectedFiles(file_filter=file_filter):
          for line_num, line in f.ChangedContents():
              if 'FRIEND_TEST(' in line:
                  problems.append('    %s:%d' % (f.LocalPath(), line_num))
  
      if not problems:
          return []
      return [
          output_api.PresubmitPromptWarning(
              'WebRTC\'s code should not use '
              'gtest\'s FRIEND_TEST() macro. Include testsupport/gtest_prod_util.h and '
              'use FRIEND_TEST_ALL_PREFIXES() instead.\n' + '\n'.join(problems))
      ]
function_tokens: def CheckNoFRIEND_TEST ( input_api , output_api , # pylint: disable=invalid-name source_file_filter ) : problems = [ ] file_filter = lambda f : ( f . LocalPath ( ) . endswith ( ( '.cc' , '.h' ) ) and source_file_filter ( f ) ) for f in input_api . AffectedFiles ( file_filter = file_filter ) : for line_num , line in f . ChangedContents ( ) : if 'FRIEND_TEST(' in line : problems . append ( '    %s:%d' % ( f . LocalPath ( ) , line_num ) ) if not problems : return [ ] return [ output_api . PresubmitPromptWarning ( 'WebRTC\'s code should not use ' 'gtest\'s FRIEND_TEST() macro. Include testsupport/gtest_prod_util.h and ' 'use FRIEND_TEST_ALL_PREFIXES() instead.\n' + '\n' . join ( problems ) ) ]