Game Development Reference
In-Depth Information
cloud1:setAlpha(0)
cloud1:setRotation(0, -10, 360, 10)
cloud1:setAlphaMorphIn(20, 3)
cloud1:setAlphaMorphOut(0, 3)
local emitter1 = CEmitter.new(cloud1)
emitter1:start()
Busted
URL : https://github.com/Olivine-Labs/busted/
Price : Free
Platforms : All Lua-based platforms
One common complaint from developers is that Lua does not enable unit-testing functionality.
Unit testing is quite an important concept, especially when working with abstract and predisplay
rendered classes. This library is not tied to any framework, but instead uses pure Lua functions. The
specs for Busted test scripts read naturally, like English. The output is quite easy to understand and
visually comprehensible, as shown in Figure 13-7 .
Figure 13-7. Busted running unit tests
Sample Code
require ("busted")
describe("Busted unit testing framework", function()
describe("should be awesome", function()
it("should be easy to use", function()
assert.truthy("Yup.")
end)
it("should have lots of features", function()
-- deep check comparisons!
assert.same({ table = "great"}, { table = "great" })
-- or check by reference!
assert.is_not.equals({ table = "great"}, { table = "great"})
assert.true(1 == 1)
 
Search WWH ::




Custom Search