# encoding: utf-8
#
# Copyright (C) 2018 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ycmd is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ycmd.  If not, see <http://www.gnu.org/licenses/>.

from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division

from hamcrest.core.base_matcher import BaseMatcher
from hamcrest import ( assert_that,
                       contains,
                       contains_string,
                       equal_to,
                       has_entries,
                       has_entry,
                       matches_regexp )
from pprint import pprint
import requests
import os.path

from ycmd.tests.clangd import ( IsolatedYcmd,
                                SharedYcmd,
                                PathToTestFile,
                                RunAfterInitialized )
from ycmd.tests.test_utils import ( BuildRequest,
                                    ChunkMatcher,
                                    CombineRequest,
                                    LineColMatcher,
                                    LocationMatcher,
                                    ErrorMatcher,
                                    WithRetry,
                                    WaitUntilCompleterServerReady )
from ycmd.utils import ReadFile


# This test is isolated to trigger objcpp hooks, rather than fetching completer
# from cache.
@IsolatedYcmd()
def Subcommands_DefinedSubcommands_test( app ):
  file_path = PathToTestFile( 'GoTo_Clang_ZeroBasedLineAndColumn_test.cc' )
  RunAfterInitialized( app, {
      'request': {
        'completer_target': 'filetype_default',
        'line_num': 10,
        'column_num': 3,
        'filetype': 'objcpp',
        'filepath': file_path
      },
      'expect': {
        'response': requests.codes.ok,
        'data': contains( *sorted( [ 'ExecuteCommand',
                                     'FixIt',
                                     'Format',
                                     'GetDoc',
                                     'GetDocImprecise',
                                     'GetType',
                                     'GetTypeImprecise',
                                     'GoTo',
                                     'GoToDeclaration',
                                     'GoToDefinition',
                                     'GoToImprecise',
                                     'GoToInclude',
                                     'GoToReferences',
                                     'RefactorRename',
                                     'RestartServer' ] ) )
      },
      'route': '/defined_subcommands',
  } )


@SharedYcmd
def Subcommands_GoTo_ZeroBasedLineAndColumn_test( app ):
  file_path = PathToTestFile( 'GoTo_Clang_ZeroBasedLineAndColumn_test.cc' )
  RunAfterInitialized( app, {
      'request': {
          'contents': ReadFile( file_path ),
          'completer_target': 'filetype_default',
          'command_arguments': [ 'GoToDefinition' ],
          'line_num': 10,
          'column_num': 3,
          'filetype': 'cpp',
          'filepath': file_path
      },
      'expect': {
          'response': requests.codes.ok,
          'data': {
              'filepath': os.path.abspath( file_path ),
              'line_num': 2,
              'column_num': 8
          }
      },
      'route': '/run_completer_command',
  } )


@SharedYcmd
def RunGoToTest_all( app, folder, command, test ):
  filepath = PathToTestFile( folder, test[ 'req' ][ 0 ] )
  common_request = {
    'completer_target' : 'filetype_default',
    'filepath'         : filepath,
    'command_arguments': [ command ],
    'contents'         : ReadFile( filepath ),
    'filetype'         : 'cpp'
  }

  request = common_request
  request.update( {
    'line_num'  : test[ 'req' ][ 1 ],
    'column_num': test[ 'req' ][ 2 ],
  } )

  response = test[ 'res' ]

  if isinstance( response, list ):
    expect = {
      'response': requests.codes.ok,
      'data': contains( *[
        LocationMatcher(
          PathToTestFile( folder, os.path.normpath( location[ 0 ] ) ),
          location[ 1 ],
          location[ 2 ]
        ) for location in response
      ] )
    }
  elif isinstance( response, tuple ):
    expect = {
      'response': requests.codes.ok,
      'data': LocationMatcher(
        PathToTestFile( folder, os.path.normpath( response[ 0 ] ) ),
        response[ 1 ],
        response[ 2 ]
      )
    }
  else:
    expect = {
      'response': requests.codes.internal_server_error,
      'data': ErrorMatcher( RuntimeError, test[ 'res' ] )
    }

  RunAfterInitialized( app, {
    'request': request,
    'route'  : '/run_completer_command',
    'expect' : expect
  } )


def Subcommands_GoTo_all_test():
  tests = [
    # Local::x -> definition/declaration of x
    { 'req': ( 'goto.cc', 23, 21 ), 'res': ( 'goto.cc', 4, 9 ) },
    # Local::in_line -> definition/declaration of Local::in_line
    { 'req': ( 'goto.cc', 24, 26 ), 'res': ( 'goto.cc', 6, 10 ) },
    # Local -> definition/declaration of Local
    { 'req': ( 'goto.cc', 24, 16 ), 'res': ( 'goto.cc', 2, 11 ) },
    # Local::out_of_line -> definition of Local::out_of_line
    { 'req': ( 'goto.cc', 25, 27 ), 'res': ( 'goto.cc', 14, 13 ) },
    # GoToDeclaration alternates between definition and declaration
    { 'req': ( 'goto.cc', 14, 13 ), 'res': ( 'goto.cc', 11, 10 ) },
    { 'req': ( 'goto.cc', 11, 10 ), 'res': ( 'goto.cc', 14, 13 ) },
    # test -> definition and declaration of test
    { 'req': ( 'goto.cc', 21,  5 ), 'res': ( 'goto.cc', 19, 5 ) },
    { 'req': ( 'goto.cc', 19,  5 ), 'res': ( 'goto.cc', 21, 5 ) },
    # Unicøde
    { 'req': ( 'goto.cc', 34,  9 ), 'res': ( 'goto.cc', 32, 26 ) },
    # Another_Unicøde
    { 'req': ( 'goto.cc', 36, 17 ), 'res': ( 'goto.cc', 32, 54 ) },
    { 'req': ( 'goto.cc', 36, 25 ), 'res': ( 'goto.cc', 32, 54 ) },
    { 'req': ( 'goto.cc', 38,  3 ), 'res': ( 'goto.cc', 36, 28 ) },
    # Expected failures
    { 'req': ( 'goto.cc', 13,  1 ), 'res': 'Cannot jump to location' },
    { 'req': ( 'goto.cc', 16,  6 ), 'res': 'Cannot jump to location' },
  ]

  for test in tests:
    for cmd in [ 'GoToDefinition', 'GoTo', 'GoToImprecise' ]:
      yield RunGoToTest_all, '', cmd, test


def Subcommands_GoToDeclaration_all_test():
  tests = [
    # Local::x -> definition/declaration of x
    { 'req': ( 'goto.cc', 23, 21 ), 'res': ( 'goto.cc', 4, 9 ) },
    # Local::in_line -> definition/declaration of Local::in_line
    { 'req': ( 'goto.cc', 24, 26 ), 'res': ( 'goto.cc', 6, 10 ) },
    # Local -> definition/declaration of Local
    { 'req': ( 'goto.cc', 24, 16 ), 'res': ( 'goto.cc', 2, 11 ) },
    # Local::out_of_line -> declaration of Local::out_of_line
    { 'req': ( 'goto.cc', 25, 27 ), 'res': ( 'goto.cc', 11, 10 ) },
    # GoToDeclaration alternates between definition and declaration
    { 'req': ( 'goto.cc', 14, 13 ), 'res': ( 'goto.cc', 11, 10 ) },
    { 'req': ( 'goto.cc', 11, 10 ), 'res': ( 'goto.cc', 14, 13 ) },
    # test -> definition and declaration of test
    { 'req': ( 'goto.cc', 21,  5 ), 'res': ( 'goto.cc', 19, 5 ) },
    { 'req': ( 'goto.cc', 19,  5 ), 'res': ( 'goto.cc', 21, 5 ) },
    # Unicøde
    { 'req': ( 'goto.cc', 34,  9 ), 'res': ( 'goto.cc', 32, 26 ) },
    # Another_Unicøde
    { 'req': ( 'goto.cc', 36, 17 ), 'res': ( 'goto.cc', 32, 54 ) },
    { 'req': ( 'goto.cc', 36, 25 ), 'res': ( 'goto.cc', 32, 54 ) },
    { 'req': ( 'goto.cc', 38,  3 ), 'res': ( 'goto.cc', 36, 28 ) },
    # Expected failures
    { 'req': ( 'goto.cc', 13,  1 ), 'res': 'Cannot jump to location' },
    { 'req': ( 'goto.cc', 16,  6 ), 'res': 'Cannot jump to location' },
  ]

  for test in tests:
    yield RunGoToTest_all, '', 'GoToDeclaration', test


def Subcommands_GoToInclude_test():
  tests = [
    { 'req': ( 'main.cpp',  1,  6 ), 'res': ( 'a.hpp',        1, 1 ) },
    { 'req': ( 'main.cpp',  2, 14 ), 'res': ( 'system/a.hpp', 1, 1 ) },
    { 'req': ( 'main.cpp',  3,  1 ), 'res': ( 'quote/b.hpp',  1, 1 ) },
    # FIXME: should fail since b.hpp is included with angled brackets but its
    # folder is added with -iquote.
    { 'req': ( 'main.cpp',  4, 10 ), 'res': ( 'quote/b.hpp',  1, 1 ) },
    { 'req': ( 'main.cpp',  5, 11 ), 'res': ( 'system/c.hpp', 1, 1 ) },
    { 'req': ( 'main.cpp',  6, 11 ), 'res': ( 'system/c.hpp', 1, 1 ) },
    # Expected failures
    { 'req': ( 'main.cpp',  7,  1 ), 'res': 'Cannot jump to location' },
    { 'req': ( 'main.cpp', 10, 13 ), 'res': 'Cannot jump to location' },
  ]

  for test in tests:
    for cmd in [ 'GoToInclude', 'GoTo', 'GoToImprecise' ]:
      yield RunGoToTest_all, 'test-include', cmd, test


def Subcommands_GoToReferences_test():
  tests = [
    # Function
    { 'req': ( 'goto.cc', 14, 21 ), 'res': [ ( 'goto.cc', 11, 10 ),
                                             ( 'goto.cc', 14, 13 ),
                                             ( 'goto.cc', 25, 22 ) ] },
    # Namespace
    { 'req': ( 'goto.cc', 24, 17 ), 'res': [ ( 'goto.cc',  2, 11 ),
                                             ( 'goto.cc', 14,  6 ),
                                             ( 'goto.cc', 23, 14 ),
                                             ( 'goto.cc', 24, 15 ),
                                             ( 'goto.cc', 25, 15 ) ] },
    # Expected failure
    { 'req': ( 'goto.cc', 27,  8 ), 'res': 'Cannot jump to location' },
  ]

  for test in tests:
    yield RunGoToTest_all, '', 'GoToReferences', test


@SharedYcmd
def RunGetSemanticTest( app,
                        filepath,
                        filetype,
                        test,
                        command,
                        response = requests.codes.ok ):
  contents = ReadFile( filepath )
  common_args = {
    'completer_target' : 'filetype_default',
    'command_arguments': command,
    'line_num'         : 10,
    'column_num'       : 3,
    'filepath'         : filepath,
    'contents'         : contents,
    'filetype'         : filetype
  }

  args = test[ 0 ]
  if response == requests.codes.ok:
    if not isinstance( test[ 1 ], BaseMatcher ):
      expected = has_entry( 'message', contains_string( test[ 1 ] ) )
    else:
      expected = has_entry( 'message', test[ 1 ] )
  else:
    expected = test[ 1 ]

  request = common_args
  request.update( args )
  test = { 'request': request,
           'route': '/run_completer_command',
           'expect': { 'response': response,
                       'data': expected } }
  RunAfterInitialized( app, test )


def Subcommands_GetType_test():
  tests = [
    # Basic pod types
    [ { 'line_num': 24, 'column_num':  3 }, 'Foo' ],
    # [ { 'line_num': 12, 'column_num':  2 }, 'Foo' ],
    [ { 'line_num': 12, 'column_num':  8 }, 'Foo' ],
    [ { 'line_num': 12, 'column_num':  9 }, 'Foo' ],
    [ { 'line_num': 12, 'column_num': 10 }, 'Foo' ],
    # [ { 'line_num': 13, 'column_num':  3 }, 'int' ],
    [ { 'line_num': 13, 'column_num':  7 }, 'int' ],
    # [ { 'line_num': 15, 'column_num':  7 }, 'char' ],

    # Function
    # [ { 'line_num': 22, 'column_num':  2 }, 'int main()' ],
    [ { 'line_num': 22, 'column_num':  6 }, 'int main()' ],

    # Declared and canonical type
    # On Ns::
    [ { 'line_num': 25, 'column_num':  3 }, 'namespace Ns' ],
    # On Type (Type)
    # [ { 'line_num': 25, 'column_num':  8 },
    # 'Ns::Type => Ns::BasicType<char>' ],
    # On "a" (Ns::Type)
    # [ { 'line_num': 25, 'column_num': 15 },
    # 'Ns::Type => Ns::BasicType<char>' ],
    # [ { 'line_num': 26, 'column_num': 13 },
    # 'Ns::Type => Ns::BasicType<char>' ],

    # Cursor on decl for refs & pointers
    [ { 'line_num': 39, 'column_num':  3 }, 'Foo' ],
    [ { 'line_num': 39, 'column_num': 11 }, 'Foo &' ],
    [ { 'line_num': 39, 'column_num': 15 }, 'Foo' ],
    [ { 'line_num': 40, 'column_num':  3 }, 'Foo' ],
    [ { 'line_num': 40, 'column_num': 11 }, 'Foo *' ],
    [ { 'line_num': 40, 'column_num': 18 }, 'Foo' ],
    # [ { 'line_num': 42, 'column_num':  3 }, 'const Foo &' ],
    [ { 'line_num': 42, 'column_num': 16 }, 'const struct Foo &' ],
    # [ { 'line_num': 43, 'column_num':  3 }, 'const Foo *' ],
    [ { 'line_num': 43, 'column_num': 16 }, 'const struct Foo *' ],

    # Cursor on usage
    [ { 'line_num': 45, 'column_num': 13 }, 'const struct Foo' ],
    # [ { 'line_num': 45, 'column_num': 19 }, 'const int' ],
    [ { 'line_num': 46, 'column_num': 13 }, 'const struct Foo *' ],
    # [ { 'line_num': 46, 'column_num': 20 }, 'const int' ],
    [ { 'line_num': 47, 'column_num': 12 }, 'Foo' ],
    [ { 'line_num': 47, 'column_num': 17 }, 'int' ],
    [ { 'line_num': 48, 'column_num': 12 }, 'Foo *' ],
    [ { 'line_num': 48, 'column_num': 18 }, 'int' ],

    # Auto in declaration
    # [ { 'line_num': 28, 'column_num':  3 }, 'struct Foo &' ],
    # [ { 'line_num': 28, 'column_num': 11 }, 'struct Foo &' ],
    [ { 'line_num': 28, 'column_num': 18 }, 'struct Foo' ],
    # [ { 'line_num': 29, 'column_num':  3 }, 'Foo *' ],
    # [ { 'line_num': 29, 'column_num': 11 }, 'Foo *' ],
    [ { 'line_num': 29, 'column_num': 18 }, 'Foo' ],
    # [ { 'line_num': 31, 'column_num':  3 }, 'const Foo &' ],
    # [ { 'line_num': 31, 'column_num': 16 }, 'const Foo &' ],
    # [ { 'line_num': 32, 'column_num':  3 }, 'const Foo *' ],
    # [ { 'line_num': 32, 'column_num': 16 }, 'const Foo *' ],

    # Auto in usage
    # [ { 'line_num': 34, 'column_num': 14 }, 'const Foo' ],
    # [ { 'line_num': 34, 'column_num': 21 }, 'const int' ],
    # [ { 'line_num': 35, 'column_num': 14 }, 'const Foo *' ],
    # [ { 'line_num': 35, 'column_num': 22 }, 'const int' ],
    [ { 'line_num': 36, 'column_num': 13 }, 'Foo' ],
    [ { 'line_num': 36, 'column_num': 19 }, 'int' ],
    # [ { 'line_num': 37, 'column_num': 13 }, 'Foo *' ],
    [ { 'line_num': 37, 'column_num': 20 }, 'int' ],

    # Unicode
    [ { 'line_num': 51, 'column_num': 13 }, 'Unicøde *' ],

    # Bound methods
    # On Win32, methods pick up an __attribute__((thiscall)) to annotate their
    # calling convention.  This shows up in the type, which isn't ideal, but
    # also prohibitively complex to try and strip out.
    [ { 'line_num': 53, 'column_num': 15 },
      matches_regexp(
          r'int bar\(int i\)(?: __attribute__\(\(thiscall\)\))?' ) ],
    [ { 'line_num': 54, 'column_num': 18 },
      matches_regexp(
          r'int bar\(int i\)(?: __attribute__\(\(thiscall\)\))?' ) ],
  ]

  for subcommand in [ 'GetType', 'GetTypeImprecise' ]:
    for test in tests:
      yield ( RunGetSemanticTest,
              PathToTestFile( 'GetType_Clang_test.cc' ),
              'cpp',
              test,
              [ subcommand ] )


def Subcommands_GetDoc_test():
  tests = [
    # from local file
    [ { 'line_num': 5, 'column_num': 10 }, 'docstring', requests.codes.ok ],
    # from header
    [ { 'line_num': 6, 'column_num': 10 }, 'docstring', requests.codes.ok ],
    # no docstring
    [ { 'line_num': 7, 'column_num': 7 }, 'int x = 3', requests.codes.ok ],
    # no hover
    [ { 'line_num': 8, 'column_num': 1 },
      ErrorMatcher( RuntimeError, 'No hover information.' ),
      requests.codes.server_error ]
  ]
  for subcommand in [ 'GetDoc', 'GetDocImprecise' ]:
    for test in tests:
      yield ( RunGetSemanticTest,
              PathToTestFile( 'GetDoc_Clang_test.cc' ),
              'cpp',
              test,
              [ subcommand ],
              test[ 2 ] )


@SharedYcmd
def RunFixItTest( app, line, column, lang, file_path, check ):
  contents = ReadFile( file_path )

  language_options = {
    'cpp11': {
      'filetype'         : 'cpp',
    },
    'cuda': {
      'filetype'         : 'cuda',
    },
    'objective-c': {
      'filetype'         : 'objc',
    },
  }

  args = {
    'completer_target' : 'filetype_default',
    'contents'         : contents,
    'filepath'         : file_path,
    'command_arguments': [ 'FixIt' ],
    'line_num'         : line,
    'column_num'       : column,
  }
  args.update( language_options[ lang ] )
  test = { 'request': args, 'route': '/detailed_diagnostic' }
  # First get diags.
  diags = RunAfterInitialized( app, test )
  while 'message' in diags and 'diagnostics' in diags[ 'message' ].lower():
    receive_diags = { 'request': args, 'route': '/receive_messages' }
    RunAfterInitialized( app, receive_diags )
    diags = RunAfterInitialized( app, test )

  results = app.post_json( '/run_completer_command',
                           BuildRequest( **args ) ).json

  pprint( results )
  check( results )


def FixIt_Check_cpp11_Ins( results ):
  # First fixit
  #   switch(A()) { // expected-error{{explicit conversion to}}
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
      'chunks': contains(
        has_entries( {
          'replacement_text': equal_to( 'static_cast<int>(' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 16, 'column_num': 10 } ),
            'end'  : has_entries( { 'line_num': 16, 'column_num': 10 } ),
          } ),
        } ),
        has_entries( {
          'replacement_text': equal_to( ')' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 16, 'column_num': 13 } ),
            'end'  : has_entries( { 'line_num': 16, 'column_num': 13 } ),
          } ),
        } )
      ),
      'location': has_entries( { 'line_num': 16, 'column_num': 0 } )
    } ) )
  } ) )


def FixIt_Check_cpp11_InsMultiLine( results ):
  # Similar to FixIt_Check_cpp11_1 but inserts split across lines
  #
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
      'chunks': contains(
        has_entries( {
          'replacement_text': equal_to( 'static_cast<int>(' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 26, 'column_num': 7 } ),
            'end'  : has_entries( { 'line_num': 26, 'column_num': 7 } ),
          } ),
        } ),
        has_entries( {
          'replacement_text': equal_to( ')' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 28, 'column_num': 2 } ),
            'end'  : has_entries( { 'line_num': 28, 'column_num': 2 } ),
          } ),
        } )
      ),
      'location': has_entries( { 'line_num': 25, 'column_num': 14 } )
    } ) )
  } ) )


def FixIt_Check_cpp11_Del( results ):
  # Removal of ::
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
      'chunks': contains(
        has_entries( {
          'replacement_text': equal_to( '' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 35, 'column_num': 7 } ),
            'end'  : has_entries( { 'line_num': 35, 'column_num': 9 } ),
          } ),
        } )
      ),
      'location': has_entries( { 'line_num': 35, 'column_num': 7 } )
    } ) )
  } ) )


def FixIt_Check_cpp11_Repl( results ):
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
      'chunks': contains(
        has_entries( {
          'replacement_text': equal_to( 'foo' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 40, 'column_num': 6 } ),
            'end'  : has_entries( { 'line_num': 40, 'column_num': 9 } ),
          } ),
        } )
      ),
      'location': has_entries( { 'line_num': 40, 'column_num': 6 } )
    } ) )
  } ) )


def FixIt_Check_cpp11_DelAdd( results ):
  assert_that( results, has_entries( {
    'fixits': contains(
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( '' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 48, 'column_num': 3 } ),
              'end'  : has_entries( { 'line_num': 48, 'column_num': 4 } ),
            } ),
          } ),
          has_entries( {
            'replacement_text': equal_to( '~' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 48, 'column_num': 9 } ),
              'end'  : has_entries( { 'line_num': 48, 'column_num': 9 } ),
            } ),
          } ),
        ),
        'location': has_entries( { 'line_num': 48, 'column_num': 3 } )
      } ),
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( '= default;' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 48, 'column_num': 15 } ),
              'end'  : has_entries( { 'line_num': 48, 'column_num': 17 } ),
            } ),
          } ),
        ),
        'location': has_entries( { 'line_num': 48, 'column_num': 3 } )
      } ),
    )
  } ) )


def FixIt_Check_objc( results ):
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
      'chunks': contains(
        has_entries( {
          'replacement_text': equal_to( 'id' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 5, 'column_num': 3 } ),
            'end'  : has_entries( { 'line_num': 5, 'column_num': 3 } ),
          } ),
        } )
      ),
      'location': has_entries( { 'line_num': 5, 'column_num': 3 } )
    } ) )
  } ) )


def FixIt_Check_objc_NoFixIt( results ):
  # and finally, a warning with no fixits
  assert_that( results, equal_to( { 'fixits': [] } ) )


def FixIt_Check_cpp11_MultiFirst( results ):
  assert_that( results, has_entries( {
    'fixits': contains(
      # first fix-it at 54,16
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( 'foo' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 16 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 19 } ),
            } ),
          } )
        ),
        'location': has_entries( { 'line_num': 54, 'column_num': 15 } )
      } ),
      # second fix-it at 54,52
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( '' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 52 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 53 } ),
            } ),
          } ),
          has_entries( {
            'replacement_text': equal_to( '~' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 58 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 58 } ),
            } ),
          } ),
        ),
        'location': has_entries( { 'line_num': 54, 'column_num': 15 } )
      } ),
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( '= default;' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 64 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 67 } ),
            } ),
          } )
        ),
        'location': has_entries( { 'line_num': 54, 'column_num': 15 } )
      } ),
    )
  } ) )


def FixIt_Check_cpp11_MultiSecond( results ):
  assert_that( results, has_entries( {
    'fixits': contains(
      # first fix-it at 54,16
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( 'foo' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 16 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 19 } ),
            } ),
          } )
        ),
        'location': has_entries( { 'line_num': 54, 'column_num': 51 } )
      } ),
      # second fix-it at 54,52
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( '' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 52 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 53 } ),
            } ),
          } ),
          has_entries( {
            'replacement_text': equal_to( '~' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 58 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 58 } ),
            } ),
          } ),
        ),
        'location': has_entries( { 'line_num': 54, 'column_num': 51 } )
      } ),
      has_entries( {
        'chunks': contains(
          has_entries( {
            'replacement_text': equal_to( '= default;' ),
            'range': has_entries( {
              'start': has_entries( { 'line_num': 54, 'column_num': 64 } ),
              'end'  : has_entries( { 'line_num': 54, 'column_num': 67 } ),
            } ),
          } )
        ),
        'location': has_entries( { 'line_num': 54, 'column_num': 51 } )
      } ),
    )
  } ) )


def FixIt_Check_unicode_Ins( results ):
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
      'chunks': contains(
        has_entries( {
          'replacement_text': equal_to( '=' ),
          'range': has_entries( {
            'start': has_entries( { 'line_num': 21, 'column_num': 9 } ),
            'end'  : has_entries( { 'line_num': 21, 'column_num': 11 } ),
          } ),
        } )
      ),
      'location': has_entries( { 'line_num': 21, 'column_num': 16 } )
    } ) )
  } ) )


def FixIt_Check_cpp11_Note( results ):
  assert_that( results, has_entries( {
    'fixits': contains(
      # First note: put parens around it
      has_entries( {
        'text': contains_string( 'parentheses around the assignment' ),
        'chunks': contains(
          ChunkMatcher( '(',
                        LineColMatcher( 59, 8 ),
                        LineColMatcher( 59, 8 ) ),
          ChunkMatcher( ')',
                        LineColMatcher( 61, 12 ),
                        LineColMatcher( 61, 12 ) )
        ),
        'location': LineColMatcher( 60, 1 ),
      } ),

      # Second note: change to ==
      has_entries( {
        'text': contains_string( '==' ),
        'chunks': contains(
          ChunkMatcher( '==',
                        LineColMatcher( 60, 8 ),
                        LineColMatcher( 60, 9 ) )
        ),
        'location': LineColMatcher( 60, 1 ),
      } ),
      # Unresolved, requires /resolve_fixit request
      has_entries( {
        'text': 'Extract subexpression to variable',
        'resolve': True,
        'command': has_entries( { 'command': 'clangd.applyTweak' } )
      } )
    )
  } ) )


def FixIt_Check_cpp11_SpellCheck( results ):
  assert_that( results, has_entries( {
    'fixits': contains(
      # Change to SpellingIsNotMyStrongPoint
      has_entries( {
        'text': contains_string( "change 'SpellingIsNotMyStringPiont' to "
                                 "'SpellingIsNotMyStrongPoint'" ),
        'chunks': contains(
          ChunkMatcher( 'SpellingIsNotMyStrongPoint',
                        LineColMatcher( 72, 9 ),
                        LineColMatcher( 72, 35 ) )
        ),
        'location': LineColMatcher( 72, 9 ),
      } ) )
  } ) )


def FixIt_Check_cuda( results ):
  assert_that( results, has_entries( {
    'fixits': contains(
      has_entries( {
        'text': contains_string(
           "change 'int' to 'void'" ),
        'chunks': contains(
          ChunkMatcher( 'void',
                        LineColMatcher( 3, 12 ),
                        LineColMatcher( 3, 15 ) )
        ),
        'location': LineColMatcher( 3, 12 ),
      } ) )
  } ) )


def FixIt_Check_SubexprExtract_Resolved( results ):
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
        'text': 'Extract subexpression to variable',
        'chunks': contains(
          ChunkMatcher( 'auto dummy = foo(i + 3);\n  ',
                        LineColMatcher( 84, 3 ),
                        LineColMatcher( 84, 3 ) ),
          ChunkMatcher( 'dummy',
                        LineColMatcher( 84, 10 ),
                        LineColMatcher( 84, 22 ) ),
        )
    } ) )
  } ) )


def FixIt_Check_RawStringReplace_Resolved( results ):
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
        'text': 'Convert to raw string',
        'chunks': contains(
          ChunkMatcher( 'R"(\\\\r\\asd\n\\v)"',
                        LineColMatcher( 80, 19 ),
                        LineColMatcher( 80, 36 ) ),
        )
    } ) )
  } ) )


def FixIt_Check_MacroExpand_Resolved( results ):
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
        'text': "Expand macro 'DECLARE_INT'",
        'chunks': contains(
          ChunkMatcher( 'int i',
                        LineColMatcher( 83,  3 ),
                        LineColMatcher( 83, 17 ) ),
        )
    } ) )
  } ) )


def FixIt_Check_AutoExpand_Resolved( results ):
  assert_that( results, has_entries( {
    'fixits': contains( has_entries( {
        'text': "Expand auto type",
        'chunks': contains(
          ChunkMatcher( 'const char *',
                        LineColMatcher( 80, 1 ),
                        LineColMatcher( 80, 6 ) ),
        )
    } ) )
  } ) )


def Subcommands_FixIt_all_test():
  cfile = PathToTestFile( 'FixIt_Clang_cpp11.cpp' )
  mfile = PathToTestFile( 'objc', 'FixIt_Clang_objc.m' )
  cufile = PathToTestFile( 'cuda', 'fixit_test.cu' )
  ufile = PathToTestFile( 'unicode.cc' )

  tests = [
    # L
    # i   C
    # n   o
    # e   l   Lang     File,  Checker
    [ 16, 0,  'cpp11', cfile, FixIt_Check_cpp11_Ins ],
    [ 25, 14, 'cpp11', cfile, FixIt_Check_cpp11_InsMultiLine ],
    [ 35, 7,  'cpp11', cfile, FixIt_Check_cpp11_Del ],
    [ 40, 6,  'cpp11', cfile, FixIt_Check_cpp11_Repl ],
    [ 48, 3,  'cpp11', cfile, FixIt_Check_cpp11_DelAdd ],

    [ 5, 3,   'objective-c', mfile, FixIt_Check_objc ],
    [ 7, 1,   'objective-c', mfile, FixIt_Check_objc_NoFixIt ],

    [ 3, 12,  'cuda', cufile, FixIt_Check_cuda ],

    # multiple errors on a single line; both with fixits
    [ 54, 15, 'cpp11', cfile, FixIt_Check_cpp11_MultiFirst ],

    # should put closest fix-it first?
    [ 54, 51, 'cpp11', cfile, FixIt_Check_cpp11_MultiSecond ],

    # unicode in line for fixit
    [ 21, 16, 'cpp11', ufile, FixIt_Check_unicode_Ins ],

    # FixIt attached to a "child" diagnostic (i.e. a Note)
    [ 60, 1,  'cpp11', cfile, FixIt_Check_cpp11_Note ],

    # FixIt due to forced spell checking
    [ 72, 9,  'cpp11', cfile, FixIt_Check_cpp11_SpellCheck ],
  ]

  for test in tests:
    yield RunFixItTest, test[ 0 ], test[ 1 ], test[ 2 ], test[ 3 ], test[ 4 ]


@WithRetry
@SharedYcmd
def RunRangedFixItTest( app, rng, expected ):
  contents = ReadFile( PathToTestFile( 'FixIt_Clang_cpp11.cpp' ) )
  args = {
    'completer_target' : 'filetype_default',
    'contents'         : contents,
    'filepath'         : PathToTestFile( 'FixIt_Clang_cpp11.cpp' ),
    'command_arguments': [ 'FixIt' ],
    'range'            : rng,
    'filetype'         : 'cpp'
  }
  app.post_json( '/event_notification',
                 CombineRequest( args, {
                   'event_name': 'FileReadyToParse',
                 } ),
                 expect_errors = True )
  WaitUntilCompleterServerReady( app, 'cpp' )
  response = app.post_json( '/run_completer_command',
                            BuildRequest( **args ) ).json
  args[ 'fixit' ] = response[ 'fixits' ][ 0 ]
  response = app.post_json( '/resolve_fixit',
                            BuildRequest( **args ) ).json
  print( 'Resolved fixit response = ' )
  print( response )
  expected( response )


def Subcommands_FixIt_Ranged_test():
  expand_auto_range = {
    'start': { 'line_num': 80, 'column_num': 1 },
    'end': { 'line_num': 80, 'column_num': 4 },
  }
  subexpression_extract_range = {
    'start': { 'line_num': 84, 'column_num': 14 },
    'end': { 'line_num': 84, 'column_num': 20 },
  }
  macro_expand_range = {
    'start': { 'line_num': 83, 'column_num': 3 },
    'end': { 'line_num': 83, 'column_num': 13 },
  }
  raw_string_range = {
    'start': { 'line_num': 80, 'column_num': 19 },
    'end': { 'line_num': 80, 'column_num': 35 },
  }
  tests = [
    [ expand_auto_range, FixIt_Check_AutoExpand_Resolved ],
    [ macro_expand_range, FixIt_Check_MacroExpand_Resolved ],
    [ subexpression_extract_range, FixIt_Check_SubexprExtract_Resolved ],
    [ raw_string_range, FixIt_Check_RawStringReplace_Resolved ],
  ]
  for test in tests:
    yield RunRangedFixItTest, test[ 0 ], test[ 1 ]


@WithRetry
@SharedYcmd
def Subcommands_FixIt_AlreadyResolved_test( app ):
  filename = PathToTestFile( 'FixIt_Clang_cpp11.cpp' )
  request = {
    'completer_target' : 'filetype_default',
    'contents'         : ReadFile( filename ),
    'filepath'         : filename,
    'command_arguments': [ 'FixIt' ],
    'line_num'         : 16,
    'column_num'       : 1,
    'filetype'         : 'cpp'
  }
  app.post_json( '/event_notification',
                 CombineRequest( request, {
                   'event_name': 'FileReadyToParse',
                 } ),
                 expect_errors = True )
  WaitUntilCompleterServerReady( app, 'cpp' )
  expected = app.post_json( '/run_completer_command',
                            BuildRequest( **request ) ).json
  print( 'expected = ' )
  print( expected )
  request[ 'fixit' ] = expected[ 'fixits' ][ 0 ]
  actual = app.post_json( '/resolve_fixit',
                          BuildRequest( **request ) ).json
  print( 'actual = ' )
  print( actual )
  assert_that( actual, equal_to( expected ) )


@SharedYcmd
def Subcommands_RefactorRename_test( app ):
  test = {
    'request': {
      'filetype': 'cpp',
      'completer_target': 'filetype_default',
      'contents': ReadFile( PathToTestFile( 'basic.cpp' ) ),
      'filepath': PathToTestFile( 'basic.cpp' ),
      'command_arguments': [ 'RefactorRename', 'Bar' ],
      'line_num': 17,
      'column_num': 4,
    },
    'expect': {
      'response': requests.codes.ok,
      'data': has_entries( {
        'fixits': contains( has_entries( {
          'chunks': contains(
            ChunkMatcher( 'Bar',
                          LineColMatcher( 1, 8 ),
                          LineColMatcher( 1, 11 ) ),
            ChunkMatcher( 'Bar',
                          LineColMatcher( 9, 3 ),
                          LineColMatcher( 9, 6 ) ),
            ChunkMatcher( '\n\n',
                          LineColMatcher( 12, 2 ),
                          LineColMatcher( 15, 1 ) ),
            ChunkMatcher( 'Bar',
                          LineColMatcher( 15,  8 ),
                          LineColMatcher( 15, 11 ) ),
            ChunkMatcher( ' ',
                          LineColMatcher( 15,  46 ),
                          LineColMatcher( 16,  1 ) ),
            ChunkMatcher( 'Bar',
                          LineColMatcher( 17, 3 ),
                          LineColMatcher( 17, 6 ) ),
            ChunkMatcher( '',
                          LineColMatcher( 17, 14 ),
                          LineColMatcher( 17, 15 ) ),
            ChunkMatcher( ' ',
                          LineColMatcher( 17, 17 ),
                          LineColMatcher( 17, 17 ) ),
            ChunkMatcher( ' ',
                          LineColMatcher( 17, 19 ),
                          LineColMatcher( 17, 19 ) ),
          )
        } ) )
      } )
    },
    'route': '/run_completer_command'
  }
  RunAfterInitialized( app, test )

[((54, 1, 54, 15), 'ycmd.tests.clangd.IsolatedYcmd', 'IsolatedYcmd', ({}, {}), '()', False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((56, 14, 56, 75), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(56, 30, 56, 73): '"""GoTo_Clang_ZeroBasedLineAndColumn_test.cc"""'}, {}), "('GoTo_Clang_ZeroBasedLineAndColumn_test.cc')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((89, 14, 89, 75), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(89, 30, 89, 73): '"""GoTo_Clang_ZeroBasedLineAndColumn_test.cc"""'}, {}), "('GoTo_Clang_ZeroBasedLineAndColumn_test.cc')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((114, 13, 114, 57), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(114, 29, 114, 35): 'folder', (114, 37, 114, 55): "test['req'][0]"}, {}), "(folder, test['req'][0])", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((157, 2, 161, 5), 'ycmd.tests.clangd.RunAfterInitialized', 'RunAfterInitialized', ({(157, 23, 157, 26): 'app', (157, 28, 161, 3): "{'request': request, 'route': '/run_completer_command', 'expect': expect}"}, {}), "(app, {'request': request, 'route':\n    '/run_completer_command', 'expect': expect})", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((274, 13, 274, 33), 'ycmd.utils.ReadFile', 'ReadFile', ({(274, 23, 274, 31): 'filepath'}, {}), '(filepath)', False, 'from ycmd.utils import ReadFile\n'), ((300, 2, 300, 34), 'ycmd.tests.clangd.RunAfterInitialized', 'RunAfterInitialized', ({(300, 23, 300, 26): 'app', (300, 28, 300, 32): 'test'}, {}), '(app, test)', False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((424, 13, 424, 34), 'ycmd.utils.ReadFile', 'ReadFile', ({(424, 23, 424, 32): 'file_path'}, {}), '(file_path)', False, 'from ycmd.utils import ReadFile\n'), ((449, 10, 449, 42), 'ycmd.tests.clangd.RunAfterInitialized', 'RunAfterInitialized', ({(449, 31, 449, 34): 'app', (449, 36, 449, 40): 'test'}, {}), '(app, test)', False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((458, 2, 458, 19), 'pprint.pprint', 'pprint', ({(458, 10, 458, 17): 'results'}, {}), '(results)', False, 'from pprint import pprint\n'), ((856, 10, 856, 51), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(856, 26, 856, 49): '"""FixIt_Clang_cpp11.cpp"""'}, {}), "('FixIt_Clang_cpp11.cpp')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((857, 10, 857, 56), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(857, 26, 857, 32): '"""objc"""', (857, 34, 857, 54): '"""FixIt_Clang_objc.m"""'}, {}), "('objc', 'FixIt_Clang_objc.m')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((858, 11, 858, 52), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(858, 27, 858, 33): '"""cuda"""', (858, 35, 858, 50): '"""fixit_test.cu"""'}, {}), "('cuda', 'fixit_test.cu')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((859, 10, 859, 40), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(859, 26, 859, 38): '"""unicode.cc"""'}, {}), "('unicode.cc')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((914, 2, 914, 45), 'ycmd.tests.test_utils.WaitUntilCompleterServerReady', 'WaitUntilCompleterServerReady', ({(914, 33, 914, 36): 'app', (914, 38, 914, 43): '"""cpp"""'}, {}), "(app, 'cpp')", False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((955, 13, 955, 54), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(955, 29, 955, 52): '"""FixIt_Clang_cpp11.cpp"""'}, {}), "('FixIt_Clang_cpp11.cpp')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((970, 2, 970, 45), 'ycmd.tests.test_utils.WaitUntilCompleterServerReady', 'WaitUntilCompleterServerReady', ({(970, 33, 970, 36): 'app', (970, 38, 970, 43): '"""cpp"""'}, {}), "(app, 'cpp')", False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1033, 2, 1033, 34), 'ycmd.tests.clangd.RunAfterInitialized', 'RunAfterInitialized', ({(1033, 23, 1033, 26): 'app', (1033, 28, 1033, 32): 'test'}, {}), '(app, test)', False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((119, 25, 119, 45), 'ycmd.utils.ReadFile', 'ReadFile', ({(119, 35, 119, 43): 'filepath'}, {}), '(filepath)', False, 'from ycmd.utils import ReadFile\n'), ((452, 4, 452, 45), 'ycmd.tests.clangd.RunAfterInitialized', 'RunAfterInitialized', ({(452, 25, 452, 28): 'app', (452, 30, 452, 43): 'receive_diags'}, {}), '(app, receive_diags)', False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((453, 12, 453, 44), 'ycmd.tests.clangd.RunAfterInitialized', 'RunAfterInitialized', ({(453, 33, 453, 36): 'app', (453, 38, 453, 42): 'test'}, {}), '(app, test)', False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((606, 24, 606, 52), 'hamcrest.equal_to', 'equal_to', ({(606, 34, 606, 50): "{'fixits': []}"}, {}), "({'fixits': []})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((900, 23, 900, 64), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(900, 39, 900, 62): '"""FixIt_Clang_cpp11.cpp"""'}, {}), "('FixIt_Clang_cpp11.cpp')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((904, 25, 904, 66), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(904, 41, 904, 64): '"""FixIt_Clang_cpp11.cpp"""'}, {}), "('FixIt_Clang_cpp11.cpp')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((910, 17, 912, 20), 'ycmd.tests.test_utils.CombineRequest', 'CombineRequest', ({(910, 33, 910, 37): 'args', (910, 39, 912, 18): "{'event_name': 'FileReadyToParse'}"}, {}), "(args, {'event_name': 'FileReadyToParse'})", False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((958, 25, 958, 45), 'ycmd.utils.ReadFile', 'ReadFile', ({(958, 35, 958, 43): 'filename'}, {}), '(filename)', False, 'from ycmd.utils import ReadFile\n'), ((966, 17, 968, 20), 'ycmd.tests.test_utils.CombineRequest', 'CombineRequest', ({(966, 33, 966, 40): 'request', (966, 42, 968, 18): "{'event_name': 'FileReadyToParse'}"}, {}), "(request, {'event_name': 'FileReadyToParse'})", False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((980, 23, 980, 43), 'hamcrest.equal_to', 'equal_to', ({(980, 33, 980, 41): 'expected'}, {}), '(expected)', False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((290, 17, 290, 50), 'hamcrest.has_entry', 'has_entry', ({(290, 28, 290, 37): '"""message"""', (290, 39, 290, 48): 'test[1]'}, {}), "('message', test[1])", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((383, 6, 384, 66), 'hamcrest.matches_regexp', 'matches_regexp', ({(384, 10, 384, 64): '"""int bar\\\\(int i\\\\)(?: __attribute__\\\\(\\\\(thiscall\\\\)\\\\))?"""'}, {}), "('int bar\\\\(int i\\\\)(?: __attribute__\\\\(\\\\(thiscall\\\\)\\\\))?')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((386, 6, 387, 66), 'hamcrest.matches_regexp', 'matches_regexp', ({(387, 10, 387, 64): '"""int bar\\\\(int i\\\\)(?: __attribute__\\\\(\\\\(thiscall\\\\)\\\\))?"""'}, {}), "('int bar\\\\(int i\\\\)(?: __attribute__\\\\(\\\\(thiscall\\\\)\\\\))?')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((409, 6, 409, 59), 'ycmd.tests.test_utils.ErrorMatcher', 'ErrorMatcher', ({(409, 20, 409, 32): 'RuntimeError', (409, 34, 409, 57): '"""No hover information."""'}, {}), "(RuntimeError, 'No hover information.')", False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((456, 27, 456, 49), 'ycmd.tests.test_utils.BuildRequest', 'BuildRequest', ({}, {}), '(**args)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((916, 28, 916, 50), 'ycmd.tests.test_utils.BuildRequest', 'BuildRequest', ({}, {}), '(**args)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((919, 28, 919, 50), 'ycmd.tests.test_utils.BuildRequest', 'BuildRequest', ({}, {}), '(**args)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((972, 28, 972, 53), 'ycmd.tests.test_utils.BuildRequest', 'BuildRequest', ({}, {}), '(**request)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((977, 26, 977, 51), 'ycmd.tests.test_utils.BuildRequest', 'BuildRequest', ({}, {}), '(**request)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((990, 18, 990, 47), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(990, 34, 990, 45): '"""basic.cpp"""'}, {}), "('basic.cpp')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((92, 22, 92, 43), 'ycmd.utils.ReadFile', 'ReadFile', ({(92, 32, 92, 41): 'file_path'}, {}), '(file_path)', False, 'from ycmd.utils import ReadFile\n'), ((154, 14, 154, 57), 'ycmd.tests.test_utils.ErrorMatcher', 'ErrorMatcher', ({(154, 28, 154, 40): 'RuntimeError', (154, 42, 154, 55): "test['res']"}, {}), "(RuntimeError, test['res'])", False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((288, 39, 288, 67), 'hamcrest.contains_string', 'contains_string', ({(288, 56, 288, 65): 'test[1]'}, {}), '(test[1])', False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((989, 28, 989, 57), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(989, 44, 989, 55): '"""basic.cpp"""'}, {}), "('basic.cpp')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((393, 14, 393, 55), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(393, 30, 393, 53): '"""GetType_Clang_test.cc"""'}, {}), "('GetType_Clang_test.cc')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((415, 14, 415, 54), 'ycmd.tests.clangd.PathToTestFile', 'PathToTestFile', ({(415, 30, 415, 52): '"""GetDoc_Clang_test.cc"""'}, {}), "('GetDoc_Clang_test.cc')", False, 'from ycmd.tests.clangd import IsolatedYcmd, SharedYcmd, PathToTestFile, RunAfterInitialized\n'), ((483, 18, 483, 68), 'hamcrest.has_entries', 'has_entries', ({(483, 31, 483, 66): "{'line_num': 16, 'column_num': 0}"}, {}), "({'line_num': 16, 'column_num': 0})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((509, 18, 509, 69), 'hamcrest.has_entries', 'has_entries', ({(509, 31, 509, 67): "{'line_num': 25, 'column_num': 14}"}, {}), "({'line_num': 25, 'column_num': 14})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((527, 18, 527, 68), 'hamcrest.has_entries', 'has_entries', ({(527, 31, 527, 66): "{'line_num': 35, 'column_num': 7}"}, {}), "({'line_num': 35, 'column_num': 7})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((544, 18, 544, 68), 'hamcrest.has_entries', 'has_entries', ({(544, 31, 544, 66): "{'line_num': 40, 'column_num': 6}"}, {}), "({'line_num': 40, 'column_num': 6})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((569, 20, 569, 70), 'hamcrest.has_entries', 'has_entries', ({(569, 33, 569, 68): "{'line_num': 48, 'column_num': 3}"}, {}), "({'line_num': 48, 'column_num': 3})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((581, 20, 581, 70), 'hamcrest.has_entries', 'has_entries', ({(581, 33, 581, 68): "{'line_num': 48, 'column_num': 3}"}, {}), "({'line_num': 48, 'column_num': 3})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((599, 18, 599, 67), 'hamcrest.has_entries', 'has_entries', ({(599, 31, 599, 65): "{'line_num': 5, 'column_num': 3}"}, {}), "({'line_num': 5, 'column_num': 3})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((623, 20, 623, 71), 'hamcrest.has_entries', 'has_entries', ({(623, 33, 623, 69): "{'line_num': 54, 'column_num': 15}"}, {}), "({'line_num': 54, 'column_num': 15})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((643, 20, 643, 71), 'hamcrest.has_entries', 'has_entries', ({(643, 33, 643, 69): "{'line_num': 54, 'column_num': 15}"}, {}), "({'line_num': 54, 'column_num': 15})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((655, 20, 655, 71), 'hamcrest.has_entries', 'has_entries', ({(655, 33, 655, 69): "{'line_num': 54, 'column_num': 15}"}, {}), "({'line_num': 54, 'column_num': 15})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((675, 20, 675, 71), 'hamcrest.has_entries', 'has_entries', ({(675, 33, 675, 69): "{'line_num': 54, 'column_num': 51}"}, {}), "({'line_num': 54, 'column_num': 51})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((695, 20, 695, 71), 'hamcrest.has_entries', 'has_entries', ({(695, 33, 695, 69): "{'line_num': 54, 'column_num': 51}"}, {}), "({'line_num': 54, 'column_num': 51})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((707, 20, 707, 71), 'hamcrest.has_entries', 'has_entries', ({(707, 33, 707, 69): "{'line_num': 54, 'column_num': 51}"}, {}), "({'line_num': 54, 'column_num': 51})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((725, 18, 725, 69), 'hamcrest.has_entries', 'has_entries', ({(725, 31, 725, 67): "{'line_num': 21, 'column_num': 16}"}, {}), "({'line_num': 21, 'column_num': 16})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((735, 16, 735, 70), 'hamcrest.contains_string', 'contains_string', ({(735, 33, 735, 68): '"""parentheses around the assignment"""'}, {}), "('parentheses around the assignment')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((744, 20, 744, 43), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(744, 36, 744, 38): '(60)', (744, 40, 744, 41): '(1)'}, {}), '(60, 1)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((749, 16, 749, 39), 'hamcrest.contains_string', 'contains_string', ({(749, 33, 749, 37): '"""=="""'}, {}), "('==')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((755, 20, 755, 43), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(755, 36, 755, 38): '(60)', (755, 40, 755, 41): '(1)'}, {}), '(60, 1)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((761, 19, 761, 68), 'hamcrest.has_entries', 'has_entries', ({(761, 32, 761, 66): "{'command': 'clangd.applyTweak'}"}, {}), "({'command': 'clangd.applyTweak'})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((772, 16, 773, 65), 'hamcrest.contains_string', 'contains_string', ({(772, 33, 773, 63): '"""change \'SpellingIsNotMyStringPiont\' to \'SpellingIsNotMyStrongPoint\'"""'}, {}), '(\n    "change \'SpellingIsNotMyStringPiont\' to \'SpellingIsNotMyStrongPoint\'")', False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((779, 20, 779, 43), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(779, 36, 779, 38): '(72)', (779, 40, 779, 41): '(9)'}, {}), '(72, 9)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((788, 16, 789, 37), 'hamcrest.contains_string', 'contains_string', ({(789, 11, 789, 35): '"""change \'int\' to \'void\'"""'}, {}), '("change \'int\' to \'void\'")', False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((795, 20, 795, 43), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(795, 36, 795, 37): '(3)', (795, 39, 795, 41): '(12)'}, {}), '(3, 12)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((738, 24, 738, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(738, 40, 738, 42): '(59)', (738, 44, 738, 45): '(8)'}, {}), '(59, 8)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((739, 24, 739, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(739, 40, 739, 42): '(59)', (739, 44, 739, 45): '(8)'}, {}), '(59, 8)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((741, 24, 741, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(741, 40, 741, 42): '(61)', (741, 44, 741, 46): '(12)'}, {}), '(61, 12)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((742, 24, 742, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(742, 40, 742, 42): '(61)', (742, 44, 742, 46): '(12)'}, {}), '(61, 12)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((752, 24, 752, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(752, 40, 752, 42): '(60)', (752, 44, 752, 45): '(8)'}, {}), '(60, 8)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((753, 24, 753, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(753, 40, 753, 42): '(60)', (753, 44, 753, 45): '(9)'}, {}), '(60, 9)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((776, 24, 776, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(776, 40, 776, 42): '(72)', (776, 44, 776, 45): '(9)'}, {}), '(72, 9)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((777, 24, 777, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(777, 40, 777, 42): '(72)', (777, 44, 777, 46): '(35)'}, {}), '(72, 35)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((792, 24, 792, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(792, 40, 792, 41): '(3)', (792, 43, 792, 45): '(12)'}, {}), '(3, 12)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((793, 24, 793, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(793, 40, 793, 41): '(3)', (793, 43, 793, 45): '(15)'}, {}), '(3, 15)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((806, 24, 806, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(806, 40, 806, 42): '(84)', (806, 44, 806, 45): '(3)'}, {}), '(84, 3)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((807, 24, 807, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(807, 40, 807, 42): '(84)', (807, 44, 807, 45): '(3)'}, {}), '(84, 3)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((809, 24, 809, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(809, 40, 809, 42): '(84)', (809, 44, 809, 46): '(10)'}, {}), '(84, 10)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((810, 24, 810, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(810, 40, 810, 42): '(84)', (810, 44, 810, 46): '(22)'}, {}), '(84, 22)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((822, 24, 822, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(822, 40, 822, 42): '(80)', (822, 44, 822, 46): '(19)'}, {}), '(80, 19)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((823, 24, 823, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(823, 40, 823, 42): '(80)', (823, 44, 823, 46): '(36)'}, {}), '(80, 36)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((835, 24, 835, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(835, 40, 835, 42): '(83)', (835, 45, 835, 46): '(3)'}, {}), '(83, 3)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((836, 24, 836, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(836, 40, 836, 42): '(83)', (836, 44, 836, 46): '(17)'}, {}), '(83, 17)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((848, 24, 848, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(848, 40, 848, 42): '(80)', (848, 44, 848, 45): '(1)'}, {}), '(80, 1)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((849, 24, 849, 47), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(849, 40, 849, 42): '(80)', (849, 44, 849, 45): '(6)'}, {}), '(80, 6)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((469, 30, 469, 61), 'hamcrest.equal_to', 'equal_to', ({(469, 40, 469, 59): '"""static_cast<int>("""'}, {}), "('static_cast<int>(')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((476, 30, 476, 45), 'hamcrest.equal_to', 'equal_to', ({(476, 40, 476, 43): '""")"""'}, {}), "(')')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((495, 30, 495, 61), 'hamcrest.equal_to', 'equal_to', ({(495, 40, 495, 59): '"""static_cast<int>("""'}, {}), "('static_cast<int>(')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((502, 30, 502, 45), 'hamcrest.equal_to', 'equal_to', ({(502, 40, 502, 43): '""")"""'}, {}), "(')')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((520, 30, 520, 44), 'hamcrest.equal_to', 'equal_to', ({(520, 40, 520, 42): '""""""'}, {}), "('')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((537, 30, 537, 47), 'hamcrest.equal_to', 'equal_to', ({(537, 40, 537, 45): '"""foo"""'}, {}), "('foo')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((555, 32, 555, 46), 'hamcrest.equal_to', 'equal_to', ({(555, 42, 555, 44): '""""""'}, {}), "('')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((562, 32, 562, 47), 'hamcrest.equal_to', 'equal_to', ({(562, 42, 562, 45): '"""~"""'}, {}), "('~')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((574, 32, 574, 56), 'hamcrest.equal_to', 'equal_to', ({(574, 42, 574, 54): '"""= default;"""'}, {}), "('= default;')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((592, 30, 592, 46), 'hamcrest.equal_to', 'equal_to', ({(592, 40, 592, 44): '"""id"""'}, {}), "('id')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((616, 32, 616, 49), 'hamcrest.equal_to', 'equal_to', ({(616, 42, 616, 47): '"""foo"""'}, {}), "('foo')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((629, 32, 629, 46), 'hamcrest.equal_to', 'equal_to', ({(629, 42, 629, 44): '""""""'}, {}), "('')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((636, 32, 636, 47), 'hamcrest.equal_to', 'equal_to', ({(636, 42, 636, 45): '"""~"""'}, {}), "('~')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((648, 32, 648, 56), 'hamcrest.equal_to', 'equal_to', ({(648, 42, 648, 54): '"""= default;"""'}, {}), "('= default;')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((668, 32, 668, 49), 'hamcrest.equal_to', 'equal_to', ({(668, 42, 668, 47): '"""foo"""'}, {}), "('foo')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((681, 32, 681, 46), 'hamcrest.equal_to', 'equal_to', ({(681, 42, 681, 44): '""""""'}, {}), "('')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((688, 32, 688, 47), 'hamcrest.equal_to', 'equal_to', ({(688, 42, 688, 45): '"""~"""'}, {}), "('~')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((700, 32, 700, 56), 'hamcrest.equal_to', 'equal_to', ({(700, 42, 700, 54): '"""= default;"""'}, {}), "('= default;')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((718, 30, 718, 45), 'hamcrest.equal_to', 'equal_to', ({(718, 40, 718, 43): '"""="""'}, {}), "('=')", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((1001, 26, 1001, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1001, 42, 1001, 43): '(1)', (1001, 45, 1001, 46): '(8)'}, {}), '(1, 8)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1002, 26, 1002, 49), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1002, 42, 1002, 43): '(1)', (1002, 45, 1002, 47): '(11)'}, {}), '(1, 11)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1004, 26, 1004, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1004, 42, 1004, 43): '(9)', (1004, 45, 1004, 46): '(3)'}, {}), '(9, 3)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1005, 26, 1005, 48), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1005, 42, 1005, 43): '(9)', (1005, 45, 1005, 46): '(6)'}, {}), '(9, 6)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1007, 26, 1007, 49), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1007, 42, 1007, 44): '(12)', (1007, 46, 1007, 47): '(2)'}, {}), '(12, 2)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1008, 26, 1008, 49), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1008, 42, 1008, 44): '(15)', (1008, 46, 1008, 47): '(1)'}, {}), '(15, 1)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1010, 26, 1010, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1010, 42, 1010, 44): '(15)', (1010, 47, 1010, 48): '(8)'}, {}), '(15, 8)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1011, 26, 1011, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1011, 42, 1011, 44): '(15)', (1011, 46, 1011, 48): '(11)'}, {}), '(15, 11)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1013, 26, 1013, 51), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1013, 42, 1013, 44): '(15)', (1013, 47, 1013, 49): '(46)'}, {}), '(15, 46)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1014, 26, 1014, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1014, 42, 1014, 44): '(16)', (1014, 47, 1014, 48): '(1)'}, {}), '(16, 1)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1016, 26, 1016, 49), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1016, 42, 1016, 44): '(17)', (1016, 46, 1016, 47): '(3)'}, {}), '(17, 3)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1017, 26, 1017, 49), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1017, 42, 1017, 44): '(17)', (1017, 46, 1017, 47): '(6)'}, {}), '(17, 6)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1019, 26, 1019, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1019, 42, 1019, 44): '(17)', (1019, 46, 1019, 48): '(14)'}, {}), '(17, 14)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1020, 26, 1020, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1020, 42, 1020, 44): '(17)', (1020, 46, 1020, 48): '(15)'}, {}), '(17, 15)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1022, 26, 1022, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1022, 42, 1022, 44): '(17)', (1022, 46, 1022, 48): '(17)'}, {}), '(17, 17)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1023, 26, 1023, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1023, 42, 1023, 44): '(17)', (1023, 46, 1023, 48): '(17)'}, {}), '(17, 17)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1025, 26, 1025, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1025, 42, 1025, 44): '(17)', (1025, 46, 1025, 48): '(19)'}, {}), '(17, 19)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((1026, 26, 1026, 50), 'ycmd.tests.test_utils.LineColMatcher', 'LineColMatcher', ({(1026, 42, 1026, 44): '(17)', (1026, 46, 1026, 48): '(19)'}, {}), '(17, 19)', False, 'from ycmd.tests.test_utils import BuildRequest, ChunkMatcher, CombineRequest, LineColMatcher, LocationMatcher, ErrorMatcher, WithRetry, WaitUntilCompleterServerReady\n'), ((471, 21, 471, 72), 'hamcrest.has_entries', 'has_entries', ({(471, 34, 471, 70): "{'line_num': 16, 'column_num': 10}"}, {}), "({'line_num': 16, 'column_num': 10})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((472, 21, 472, 72), 'hamcrest.has_entries', 'has_entries', ({(472, 34, 472, 70): "{'line_num': 16, 'column_num': 10}"}, {}), "({'line_num': 16, 'column_num': 10})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((478, 21, 478, 72), 'hamcrest.has_entries', 'has_entries', ({(478, 34, 478, 70): "{'line_num': 16, 'column_num': 13}"}, {}), "({'line_num': 16, 'column_num': 13})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((479, 21, 479, 72), 'hamcrest.has_entries', 'has_entries', ({(479, 34, 479, 70): "{'line_num': 16, 'column_num': 13}"}, {}), "({'line_num': 16, 'column_num': 13})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((497, 21, 497, 71), 'hamcrest.has_entries', 'has_entries', ({(497, 34, 497, 69): "{'line_num': 26, 'column_num': 7}"}, {}), "({'line_num': 26, 'column_num': 7})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((498, 21, 498, 71), 'hamcrest.has_entries', 'has_entries', ({(498, 34, 498, 69): "{'line_num': 26, 'column_num': 7}"}, {}), "({'line_num': 26, 'column_num': 7})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((504, 21, 504, 71), 'hamcrest.has_entries', 'has_entries', ({(504, 34, 504, 69): "{'line_num': 28, 'column_num': 2}"}, {}), "({'line_num': 28, 'column_num': 2})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((505, 21, 505, 71), 'hamcrest.has_entries', 'has_entries', ({(505, 34, 505, 69): "{'line_num': 28, 'column_num': 2}"}, {}), "({'line_num': 28, 'column_num': 2})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((522, 21, 522, 71), 'hamcrest.has_entries', 'has_entries', ({(522, 34, 522, 69): "{'line_num': 35, 'column_num': 7}"}, {}), "({'line_num': 35, 'column_num': 7})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((523, 21, 523, 71), 'hamcrest.has_entries', 'has_entries', ({(523, 34, 523, 69): "{'line_num': 35, 'column_num': 9}"}, {}), "({'line_num': 35, 'column_num': 9})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((539, 21, 539, 71), 'hamcrest.has_entries', 'has_entries', ({(539, 34, 539, 69): "{'line_num': 40, 'column_num': 6}"}, {}), "({'line_num': 40, 'column_num': 6})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((540, 21, 540, 71), 'hamcrest.has_entries', 'has_entries', ({(540, 34, 540, 69): "{'line_num': 40, 'column_num': 9}"}, {}), "({'line_num': 40, 'column_num': 9})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((557, 23, 557, 73), 'hamcrest.has_entries', 'has_entries', ({(557, 36, 557, 71): "{'line_num': 48, 'column_num': 3}"}, {}), "({'line_num': 48, 'column_num': 3})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((558, 23, 558, 73), 'hamcrest.has_entries', 'has_entries', ({(558, 36, 558, 71): "{'line_num': 48, 'column_num': 4}"}, {}), "({'line_num': 48, 'column_num': 4})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((564, 23, 564, 73), 'hamcrest.has_entries', 'has_entries', ({(564, 36, 564, 71): "{'line_num': 48, 'column_num': 9}"}, {}), "({'line_num': 48, 'column_num': 9})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((565, 23, 565, 73), 'hamcrest.has_entries', 'has_entries', ({(565, 36, 565, 71): "{'line_num': 48, 'column_num': 9}"}, {}), "({'line_num': 48, 'column_num': 9})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((576, 23, 576, 74), 'hamcrest.has_entries', 'has_entries', ({(576, 36, 576, 72): "{'line_num': 48, 'column_num': 15}"}, {}), "({'line_num': 48, 'column_num': 15})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((577, 23, 577, 74), 'hamcrest.has_entries', 'has_entries', ({(577, 36, 577, 72): "{'line_num': 48, 'column_num': 17}"}, {}), "({'line_num': 48, 'column_num': 17})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((594, 21, 594, 70), 'hamcrest.has_entries', 'has_entries', ({(594, 34, 594, 68): "{'line_num': 5, 'column_num': 3}"}, {}), "({'line_num': 5, 'column_num': 3})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((595, 21, 595, 70), 'hamcrest.has_entries', 'has_entries', ({(595, 34, 595, 68): "{'line_num': 5, 'column_num': 3}"}, {}), "({'line_num': 5, 'column_num': 3})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((618, 23, 618, 74), 'hamcrest.has_entries', 'has_entries', ({(618, 36, 618, 72): "{'line_num': 54, 'column_num': 16}"}, {}), "({'line_num': 54, 'column_num': 16})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((619, 23, 619, 74), 'hamcrest.has_entries', 'has_entries', ({(619, 36, 619, 72): "{'line_num': 54, 'column_num': 19}"}, {}), "({'line_num': 54, 'column_num': 19})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((631, 23, 631, 74), 'hamcrest.has_entries', 'has_entries', ({(631, 36, 631, 72): "{'line_num': 54, 'column_num': 52}"}, {}), "({'line_num': 54, 'column_num': 52})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((632, 23, 632, 74), 'hamcrest.has_entries', 'has_entries', ({(632, 36, 632, 72): "{'line_num': 54, 'column_num': 53}"}, {}), "({'line_num': 54, 'column_num': 53})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((638, 23, 638, 74), 'hamcrest.has_entries', 'has_entries', ({(638, 36, 638, 72): "{'line_num': 54, 'column_num': 58}"}, {}), "({'line_num': 54, 'column_num': 58})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((639, 23, 639, 74), 'hamcrest.has_entries', 'has_entries', ({(639, 36, 639, 72): "{'line_num': 54, 'column_num': 58}"}, {}), "({'line_num': 54, 'column_num': 58})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((650, 23, 650, 74), 'hamcrest.has_entries', 'has_entries', ({(650, 36, 650, 72): "{'line_num': 54, 'column_num': 64}"}, {}), "({'line_num': 54, 'column_num': 64})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((651, 23, 651, 74), 'hamcrest.has_entries', 'has_entries', ({(651, 36, 651, 72): "{'line_num': 54, 'column_num': 67}"}, {}), "({'line_num': 54, 'column_num': 67})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((670, 23, 670, 74), 'hamcrest.has_entries', 'has_entries', ({(670, 36, 670, 72): "{'line_num': 54, 'column_num': 16}"}, {}), "({'line_num': 54, 'column_num': 16})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((671, 23, 671, 74), 'hamcrest.has_entries', 'has_entries', ({(671, 36, 671, 72): "{'line_num': 54, 'column_num': 19}"}, {}), "({'line_num': 54, 'column_num': 19})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((683, 23, 683, 74), 'hamcrest.has_entries', 'has_entries', ({(683, 36, 683, 72): "{'line_num': 54, 'column_num': 52}"}, {}), "({'line_num': 54, 'column_num': 52})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((684, 23, 684, 74), 'hamcrest.has_entries', 'has_entries', ({(684, 36, 684, 72): "{'line_num': 54, 'column_num': 53}"}, {}), "({'line_num': 54, 'column_num': 53})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((690, 23, 690, 74), 'hamcrest.has_entries', 'has_entries', ({(690, 36, 690, 72): "{'line_num': 54, 'column_num': 58}"}, {}), "({'line_num': 54, 'column_num': 58})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((691, 23, 691, 74), 'hamcrest.has_entries', 'has_entries', ({(691, 36, 691, 72): "{'line_num': 54, 'column_num': 58}"}, {}), "({'line_num': 54, 'column_num': 58})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((702, 23, 702, 74), 'hamcrest.has_entries', 'has_entries', ({(702, 36, 702, 72): "{'line_num': 54, 'column_num': 64}"}, {}), "({'line_num': 54, 'column_num': 64})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((703, 23, 703, 74), 'hamcrest.has_entries', 'has_entries', ({(703, 36, 703, 72): "{'line_num': 54, 'column_num': 67}"}, {}), "({'line_num': 54, 'column_num': 67})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((720, 21, 720, 71), 'hamcrest.has_entries', 'has_entries', ({(720, 34, 720, 69): "{'line_num': 21, 'column_num': 9}"}, {}), "({'line_num': 21, 'column_num': 9})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n'), ((721, 21, 721, 72), 'hamcrest.has_entries', 'has_entries', ({(721, 34, 721, 70): "{'line_num': 21, 'column_num': 11}"}, {}), "({'line_num': 21, 'column_num': 11})", False, 'from hamcrest import assert_that, contains, contains_string, equal_to, has_entries, has_entry, matches_regexp\n')]