Add LuaValue.load() function for library initialization. Change unit tests to use JavaBytecodeCompiler for lua->Java conversion.
This commit is contained in:
@@ -87,7 +87,7 @@ public class CompatibiltyTest {
|
||||
}
|
||||
public static class JseBytecodeTest extends CompatibiltyTestSuite {
|
||||
public JseBytecodeTest() {
|
||||
super(ScriptDrivenTest.PlatformType.JSE);
|
||||
super(ScriptDrivenTest.PlatformType.LUAJIT);
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
@@ -32,8 +32,7 @@ import java.io.PrintStream;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.luaj.vm2.lib.BaseLib;
|
||||
import org.luaj.vm2.lib.DebugLib;
|
||||
import org.luaj.vm2.luajc.LuaJCompiler;
|
||||
import org.luaj.vm2.luajc.JavaBytecodeCompiler;
|
||||
|
||||
abstract
|
||||
public class ScriptDrivenTest extends TestCase {
|
||||
@@ -112,7 +111,7 @@ public class ScriptDrivenTest extends TestCase {
|
||||
return c;
|
||||
} else {
|
||||
script = new FileInputStream(file);
|
||||
return LuaJCompiler.compile( script, name, _G);
|
||||
return JavaBytecodeCompiler.load( script, name, _G);
|
||||
}
|
||||
default:
|
||||
script = new FileInputStream(file);
|
||||
|
||||
Reference in New Issue
Block a user