lua-users home
lua-l archive

RE: [ANN] Lunity v0.9 - A Unit Test framework in a single file

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


From: Sam Roberts
> On Tue, Nov 25, 2008 at 1:45 PM, <phrogz@me.com> wrote:
> > It occurs to me that I haven't shared this yet. It's quite similar to
other
> > unit test frameworks. A few things that made me write it and like it:
> You might want to add it to:
> http://lua-users.org/wiki/UnitTesting
Will do.
> From a quick glance, lunity appears to be almost identical to lunit?
> http://www.mroth.net/lunit/documentation-0.4.txt
It is quite similar, to be sure. Though the assertions are standard in my
experience with other test suites, I also strove for consistency with lunit.
The big differentiator for me was the ability to run the tests from the test
file itself, instead of requiring a shell script (that doesn't work on
Windows). That alone is why I wrote lunity.
I also create a dummy data table that is passed into setup() and each test
and teardown(), which is a very minor convenience.
I also was feeling a bit clever and allowed this syntax:
 module( 'TEST_RUNTIME', lunity )
instead of lunit's:
 module( "my_testcase", lunit.testcase )

AltStyle によって変換されたページ (->オリジナル) /