Refactor library initialization code.
This commit is contained in:
@@ -55,7 +55,7 @@ public class LuaOperationsTest extends TestCase {
|
||||
private final LuaValue stringlong = LuaValue.valueOf(samplestringlong);
|
||||
private final LuaValue stringdouble = LuaValue.valueOf(samplestringdouble);
|
||||
private final LuaTable table = LuaValue.listOf( new LuaValue[] { LuaValue.valueOf("aaa"), LuaValue.valueOf("bbb") } );
|
||||
private final LuaFunction somefunc = new ZeroArgFunction("sample",0,table) { public LuaValue call() { return NONE;}};
|
||||
private final LuaValue somefunc = new ZeroArgFunction(table) { public LuaValue call() { return NONE;}};
|
||||
private final LuaThread thread = new LuaThread(somefunc,table);
|
||||
private final Prototype proto = new Prototype();
|
||||
private final LuaClosure someclosure = new LuaClosure(proto,table);
|
||||
@@ -207,7 +207,7 @@ public class LuaOperationsTest extends TestCase {
|
||||
|
||||
// function tests
|
||||
{
|
||||
LuaFunction f = new ZeroArgFunction("f",0,_G) { public LuaValue call() { return env.get("a");}};
|
||||
LuaFunction f = new ZeroArgFunction(_G) { public LuaValue call() { return env.get("a");}};
|
||||
assertEquals( aaa, f.call() );
|
||||
f.setfenv(newenv);
|
||||
assertEquals( newenv, f.getfenv() );
|
||||
|
||||
Reference in New Issue
Block a user