@@ -90,7 +90,7 @@ function! Test_Disable_Diagnostics_Update_In_insert_Mode()
9090 call WaitForAssert ( {- > assert_true ( len ( sign_getplaced (
9191 \ ' %' ,
9292 \ { ' group' : ' ycm_signs' } )[ 0 ][ ' signs' ] ) ) } )
93- call FeedAndCheckAgain ( " A\<CR> " , funcref ( ' CheckNoPropsAfterNewLine' )
93+ call FeedAndCheckAgain ( " A\<CR> " , funcref ( ' CheckNoPropsAfterNewLine' ) )
9494 endfunction
9595
9696 function ! CheckNoPropsAfterNewLine ( id ) closure
@@ -103,7 +103,7 @@ function! Test_Disable_Diagnostics_Update_In_insert_Mode()
103103 \ 1 , { ' end_lnum' : -1 ,
104104 \ ' types' : [ ' YcmVirtDiagWarning' ,
105105 \ ' YcmVirtDiagError' ,
106- \ ' YcmVirtDiagPadding' ] } ) ) ) )
106+ \ ' YcmVirtDiagPadding' ] } ) ) ) } )
107107 endfunction
108108
109109 call FeedAndCheckMain ( ' imain(' ,
@@ -121,14 +121,14 @@ function! Test_Changing_Filetype_Refreshes_Diagnostics()
121121 \ ' /test/testdata/diagnostics/foo.xml' ,
122122 \ { ' native_ft' : 0 } )
123123
124- call assert_equal ( ' xml' , &ft )
124+ call assert_equal ( ' xml' , &filetype )
125125 call assert_false (
126126 \ pyxeval ( ' ycm_state._buffers[' . bufnr ( ' %' ) . ' ]._async_diags' ) )
127127 call assert_true ( empty ( sign_getplaced (
128128 \ ' %' ,
129129 \ { ' group' : ' ycm_signs' } )[ 0 ][ ' signs' ] ) )
130130 setf typescript
131- call assert_equal ( ' typescript' , &ft )
131+ call assert_equal ( ' typescript' , &filetype )
132132 call assert_false (
133133 \ pyxeval ( ' ycm_state._buffers[' . bufnr ( ' %' ) . ' ]._async_diags' ) )
134134 " Diagnostics are async, so wait for the assert to return 0 for a while.
@@ -151,7 +151,7 @@ function! Test_MessagePoll_After_LocationList()
151151 \ ' /test/testdata/diagnostics/foo.cpp' , {} )
152152
153153 setf cpp
154- call assert_equal ( ' cpp' , &ft )
154+ call assert_equal ( ' cpp' , &filetype )
155155 call WaitForAssert ( {- > assert_equal ( 2 , len ( sign_getplaced (
156156 \ ' %' ,
157157 \ { ' group' : ' ycm_signs' } )[ 0 ][ ' signs' ] ) ) } )
@@ -251,7 +251,7 @@ function! Test_ShowDetailedDiagnostic_CmdLine()
251251
252252 call assert_equal (
253253 \ " Format specifies type 'char *' but the argument has type 'int' "
254- \ . ' (fix available)' ,
254+ \ . ' (fix available) [-Wformat] ' ,
255255 \ trim ( output ) )
256256
257257 % bwipe!
@@ -264,8 +264,11 @@ function! Test_ShowDetailedDiagnostic_PopupAtCursor()
264264 call cursor ( [ 3 , 1 ] )
265265 YcmShowDetailedDiagnostic popup
266266
267- let id = popup_locate ( 4 , 1 )
268- call assert_notequal ( 0 , id, " Couldn't find popup!" )
267+ let id = popup_locate ( 4 , 16 )
268+ call assert_notequal (
269+ \ 0 ,
270+ \ id,
271+ \ " Couldn't find popup! " .. youcompleteme#test#popup#DumpPopups () )
269272
270273 if exists ( ' *popup_list' )
271274 let popups = popup_list ()
@@ -274,13 +277,13 @@ function! Test_ShowDetailedDiagnostic_PopupAtCursor()
274277
275278 call youcompleteme#test#popup#CheckPopupPosition ( id, {
276279 \ ' visible' : 1 ,
277- \ ' col' : 1 ,
280+ \ ' col' : 16 ,
278281 \ ' line' : 4 ,
279282 \ } )
280283 call assert_equal (
281284 \ [
282285 \ " Format specifies type 'char *' but the argument has type 'int' "
283- \ . ' (fix available)' ,
286+ \ . ' (fix available) [-Wformat] ' ,
284287 \ ],
285288 \ getbufline ( winbufnr (id), 1 , ' $' ) )
286289
@@ -315,8 +318,11 @@ function! Test_ShowDetailedDiagnostic_Popup_WithCharacters()
315318 call cursor ( [ 4 , 1 ] )
316319 YcmShowDetailedDiagnostic popup
317320
318- let id = popup_locate ( 5 , 1 )
319- call assert_notequal ( 0 , id, " Couldn't find popup!" )
321+ let id = popup_locate ( 5 , 7 )
322+ call assert_notequal (
323+ \ 0 ,
324+ \ id,
325+ \ " Couldn't find popup! " .. youcompleteme#test#popup#DumpPopups () )
320326
321327 if exists ( ' *popup_list' )
322328 let popups = popup_list ()
@@ -325,7 +331,7 @@ function! Test_ShowDetailedDiagnostic_Popup_WithCharacters()
325331
326332 call youcompleteme#test#popup#CheckPopupPosition ( id, {
327333 \ ' visible' : 1 ,
328- \ ' col' : 1 ,
334+ \ ' col' : 7 ,
329335 \ ' line' : 5 ,
330336 \ } )
331337 call assert_match (
0 commit comments