Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show on which line assertion failed #54

Closed
kristijanhusak opened this issue Nov 8, 2018 · 0 comments
Closed

Show on which line assertion failed #54

kristijanhusak opened this issue Nov 8, 2018 · 0 comments

Comments

@kristijanhusak
Copy link

Consider having a test like this:

let s:suite = themis#suite('my_test')
let s:assert = themis#helper('assert')

function! s:suite.test_valid() abort
  call s:assert.equals(0, 1-1)
  call s:assert.equals(2, 1+1)
  call s:assert.equals(3, 1+1)
  call s:assert.equals(4, 2+2)
  call s:assert.equals(5, 3+2)
endfunction

Output for spec reporter is this:

my_test
  [✖] test_valid
      The equivalent values were expected, but it was not the case.

          expected: 2
               got: 3

tests 1
passes 0
fails 1

There's no information which exact assertion (on which line) failed.
Same thing with other reporters.

Something like this would be great:

my_test
  [✖] test_valid
      The equivalent values were expected, but it was not the case.

          expected: 2
               got: 3
		      line: 7

tests 1
passes 0
fails 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant