Skip to content

Commit

Permalink
coverage#CreateReport: move assertions up (google#23)
Browse files Browse the repository at this point in the history
This makes it easier in case of errors to see where it is coming from.
  • Loading branch information
blueyed authored and dbarnett committed May 25, 2018
1 parent 1d00828 commit 1bb5a1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions autoload/coverage.vim
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,13 @@ function! coverage#CreateReport(covered, uncovered, partial, ...) abort
if a:0 > 0
let l:extra_dict = maktaba#ensure#IsDict(a:1)
endif
call maktaba#ensure#IsList(a:covered)
call maktaba#ensure#IsList(a:uncovered)
call maktaba#ensure#IsList(a:partial)
return extend(l:extra_dict,
\ {'covered': maktaba#ensure#IsList(a:covered),
\ 'uncovered': maktaba#ensure#IsList(a:uncovered),
\ 'partial': maktaba#ensure#IsList(a:partial)})
\ {'covered': a:covered,
\ 'uncovered': a:uncovered,
\ 'partial': a:partial})
endfunction


Expand Down

0 comments on commit 1bb5a1a

Please sign in to comment.