Uberi / Yunit

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

Add AssertFail() method #13

Closed aviaryan closed 8 years ago

aviaryan commented 8 years ago

This will make the lib more complete.

aviaryan commented 8 years ago

@infogulch @Uberi Let me know if you want me to send a PR

infogulch commented 8 years ago

What's wrong with Yunit.Assert(x != y) or Yunit.Assert(!(1 = 2))?

By the way, you can still track exceptions with the ExpectedException behavior. It doesn't appear to be documented specifically, but its used in the Example.ahk file.

The whole testing framework file is 101 lines that just take advantage of a simple test layout convention. Adding an AssertFail() method would just add another 4 lines to the library and waste at least 2 characters per assertion compared to `Assert(!()).

I don't see the benefit. You'll have to be more convincing. :smile:

aviaryan commented 8 years ago

LOL. You are right. I was thinking about making the library complete in the documentation but the lib as it is is lightweight and convenient. So closing ..