Skip to content

Instantly share code, notes, and snippets.

@rbtnn
Last active January 2, 2016 00:28
Show Gist options
  • Save rbtnn/8223215 to your computer and use it in GitHub Desktop.
Save rbtnn/8223215 to your computer and use it in GitHub Desktop.
Vital.Assertion
let s:V = vital#of('vital')
let s:S = s:V.import('Assertion')
call s:S.define('Assert',1)
function! s:hoge(x)
return a:x * 3
endfunction
Assert 3 <!> s:hoge(4)
" Assert 3 <!> s:hoge(4) :Succeeded
Assert '' <=> s:hoge(4)
" Assert '' <=> s:hoge(4) :Failed
" > assert_point: C:\Users\rbtnn\Desktop\a.vim, line 14
" > lhs: ''
" > rhs: s:hoge(4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment