diff --git a/python/ycm/hierarchy_tree.py b/python/ycm/hierarchy_tree.py index 5f9f754971..b3c3455622 100644 --- a/python/ycm/hierarchy_tree.py +++ b/python/ycm/hierarchy_tree.py @@ -37,15 +37,19 @@ def ToLocation( self, subindex : int ): MAX_HANDLES_PER_INDEX = 1000000 + def handle_to_index( handle : int ): return abs( handle ) // MAX_HANDLES_PER_INDEX + def handle_to_location_index( handle : int ): return abs( handle ) % MAX_HANDLES_PER_INDEX + def make_handle( index : int, location_index : int ): return index * MAX_HANDLES_PER_INDEX + location_index + class HierarchyTree: def __init__( self ): self._up_nodes : List[ HierarchyNode ] = [] diff --git a/python/ycm/tests/command_test.py b/python/ycm/tests/command_test.py index 89b4f350f9..ceebf28c38 100644 --- a/python/ycm/tests/command_test.py +++ b/python/ycm/tests/command_test.py @@ -102,7 +102,8 @@ def test_SendCommandRequest_BuildRange_NoVisualMarks( self, ycm, *args ): 'column_num': 12 } } - } + }, + False ) @@ -135,7 +136,8 @@ def test_SendCommandRequest_BuildRange_VisualMarks( self, ycm, *args ): 'column_num': 9 } } - } + }, + False ) @@ -153,7 +155,8 @@ def test_SendCommandRequest_IgnoreFileTypeOption( self, ycm, *args ): 'tab_size': 2, 'insert_spaces': True }, - } + }, + False ) with patch( 'ycm.youcompleteme.SendCommandRequest' ) as send_request: diff --git a/test/hover.test.vim b/test/hover.test.vim index f19df03db3..e430980540 100644 --- a/test/hover.test.vim +++ b/test/hover.test.vim @@ -71,7 +71,7 @@ let s:cpp_lifetime = { \ '', \ 'Type: char', \ 'Offset: 16 bytes', - \ 'Size: 1 byte (+7 bytes padding)', + \ 'Size: 1 byte (+7 bytes padding), alignment 1 byte', \ 'nobody will live > 128 years', \ '', \ '// In PointInTime',