redding / assert

Assertion style testing framework.
https://github.com/redding/assert
MIT License
10 stars 1 forks source link

properly handle skip backtraces #131

Closed kellyredding closed 11 years ago

kellyredding commented 11 years ago

There were a couple holes I discovered while debugging the backtrace problems I saw in using the TODO skip in #130.

First, the skip result wasn't checking its context info called_from when building its trace value. Fail results do this so the macro fails show the correct result. Skips need to do this as well since they can be generated from a context caller like fail results from a macro.

Second, the context info wasn't properly building its called_from. The first caller should be used as the called from if no called from is explicitly provided. What's funny is it seems the tests were originally written with this intent, just not implmented properly.

@jcredding ready for review.

jcredding commented 11 years ago

@kellyredding - Holla :boom: