Correct the order of arguments for AssertEqual in some places.

This commit is contained in:
w0rp
2016-10-14 20:34:21 +01:00
parent 56b866c8d8
commit c726503acf
4 changed files with 26 additions and 26 deletions
+9 -9
View File
@@ -5,7 +5,7 @@ After:
let g:ale_buffer_loclist_map = {}
Execute (Count should be 0 when data is empty):
AssertEqual ale#statusline#Count(bufnr('%')), [0, 0]
AssertEqual [0, 0], ale#statusline#Count(bufnr('%'))
Before:
let g:ale_buffer_count_map = {'44': [1, 2]}
@@ -14,13 +14,13 @@ After:
let g:ale_buffer_loclist_map = {}
Execute (Count should read data from the cache):
AssertEqual ale#statusline#Count(44), [1, 2]
AssertEqual [1, 2], ale#statusline#Count(44)
Execute (Update the cache with new data):
call ale#statusline#Update(44, [])
Then (The cache should reflect the new data):
AssertEqual ale#statusline#Count(44), [0, 0]
AssertEqual [0, 0], ale#statusline#Count(44)
Before:
let g:ale_buffer_loclist_map = {'1': [{'lnum': 1, 'bufnr': 1, 'vcol': 0, 'linter_name': 'testlinter', 'nr': -1, 'type': 'E', 'col': 1, 'text': 'Test Error'}]}
@@ -29,10 +29,10 @@ After:
let g:ale_buffer_loclist_map = {}
Execute (Count should be match the loclist):
AssertEqual ale#statusline#Count(1), [1, 0]
AssertEqual [1, 0], ale#statusline#Count(1)
Execute (Output should be empty for non-existant buffer):
AssertEqual ale#statusline#Count(9001), [0, 0]
AssertEqual [0, 0], ale#statusline#Count(9001)
Before:
let g:ale_statusline_format = ['%sE', '%sW', 'OKIE']
@@ -44,22 +44,22 @@ Execute (Given some errors):
call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'E'}])
Then (Statusline is formatted to the users preference):
AssertEqual ale#statusline#Status(), "2E"
AssertEqual '2E', ale#statusline#Status()
Execute (Given some warnings):
call ale#statusline#Update(bufnr('%'), [{'type': 'W'}, {'type': 'W'}, {'type': 'W'}])
Then (Statusline is formatted to the users preference):
AssertEqual ale#statusline#Status(), "3W"
AssertEqual '3W', ale#statusline#Status()
Execute (Given some warnings, and errors.):
call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'W'}, {'type': 'W'}])
Then (Statusline is formatted to the users preference):
AssertEqual ale#statusline#Status(), "1E 2W"
AssertEqual '1E 2W', ale#statusline#Status()
Execute (Given a lack of data):
call ale#statusline#Update(bufnr('%'), [])
Then (Statusline is formatted to the users preference):
AssertEqual ale#statusline#Status(), 'OKIE'
AssertEqual 'OKIE', ale#statusline#Status()