Uberi / Yunit

Super simple testing framework for AutoHotkey.
GNU Affero General Public License v3.0
53 stars 21 forks source link

Line number of failed test #21

Closed trashner closed 7 years ago

trashner commented 7 years ago

I noticed the line number that is shown for a failed test refers to the 'Yunit.ahk' file, and not the actual test suite file.

E.g. Line #85: FAIL or Line #60: ExpectedException

Is this by design?

mmikeww commented 7 years ago

I've noticed this too. I tried to fix it at one point, but never figured it out

trashner commented 7 years ago

Think I got it. Change line #85 in 'Yunit.ahk' from throw Exception(Message, -1) to throw Exception(Message, -2).

-2 goes one entry down the call stack and therefor reports back the line number of the actual test script.

hoppfrosch commented 7 years ago

Thanks for pointing this out - will fix ASAP