Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » Need help getting started with Lua & luaunit or MoreUnit in Eclipse(lua, luaunit, moreunit)
Need help getting started with Lua & luaunit or MoreUnit in Eclipse [message #1836616] Sat, 09 January 2021 00:54
Steve Kelem is currently offline Steve KelemFriend
Messages: 11
Registered: July 2009
Junior Member
Hi. I've programmed in Java before in Eclipse.

I'm trying to set up Eclipse so I can run/debug Lua. I set up a simple test, but am unable to run it.

I've loaded luaunit and MoreUnit into Eclipse. (MoreUnit looked promising, but the "generate" command doesn't seem to be implemented.)

I have two files:

main.lua:
-- Some super function to test
function my_super_function( arg1, arg2 ) return arg1 + arg2 end

function plus (a, b) return a+b end

function minus (a, b) return a-b end

function times (a, b) return a*b end

local function main()
  print("hello world!")
  -- LuaUnit:run()
end
main()


main_Test.lua:
luaunit = require('luaunit')

function test_plus()
  expected = 5
  actual = plus(2,3)
  assertEquals(expected, actual, "test_plus")
end

os.exit(luaunit.LuaUnit.run(),close)


When I try to run the test file, I get the following on the console:
<terminated> <abnormal exit code:-1073741571> LuaTest01_main_Test [Lua Application] C:\Program Files\Java\jdk-13.0.1\bin\java (Jan 8, 2021, 4:46:35)
Previous Topic:Cant start debugger
Next Topic:Trouble understanding how to declare a field type.
Goto Forum:
  


Current Time: Fri May 03 18:23:55 GMT 2024

Powered by FUDForum. Page generated in 0.03441 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top