Created
February 23, 2016 02:37
-
-
Save ToxicFrog/c77799a2f7f6f23de756 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function love.conf(t) | |
t.name = "Example project -- tests" | |
t.author = "ToxicFrog" | |
t.identity = "example.test" | |
t.version = "0.9.0" -- replace with target love2d version | |
t.console = true -- enable console on windows for debug logging | |
-- disable all module loading | |
-- if some of your tests actually call love2d API functions, either enable them or provide stubs | |
for name in pairs(t.modules) do | |
t.modules[name] = false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- entry point for the tests | |
EXPORT_ASSERT_TO_GLOBALS=true | |
require "luaunit" | |
TestFoo = {} | |
function TestFoo:example() | |
assertEquals(1, 1) | |
assertNotEquals(1, 2) | |
end | |
os.exit( LuaUnit.new():runSuite() ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment