Skip to content

Instantly share code, notes, and snippets.

@ToxicFrog
Created February 23, 2016 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ToxicFrog/c77799a2f7f6f23de756 to your computer and use it in GitHub Desktop.
Save ToxicFrog/c77799a2f7f6f23de756 to your computer and use it in GitHub Desktop.
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
-- 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