Fixes to luajc bytecode generation.
This commit is contained in:
@@ -76,9 +76,9 @@ public class CompatibiltyTest extends TestSuite {
|
||||
|
||||
public static TestSuite suite() {
|
||||
TestSuite suite = new TestSuite("Compatibility Tests");
|
||||
suite.addTest( new TestSuite( JseCompatibilityTest.class, "JSE Tests" ) );
|
||||
suite.addTest( new TestSuite( JmeCompatibilityTest.class, "JME Tests" ) );
|
||||
suite.addTest( new TestSuite( LuaJCTest.class, "JSE Bytecode Tests" ) );
|
||||
suite.addTest( new TestSuite( JseCompatibilityTest.class, "JSE Compatibility Tests" ) );
|
||||
suite.addTest( new TestSuite( JmeCompatibilityTest.class, "JME Compatibility Tests" ) );
|
||||
suite.addTest( new TestSuite( LuaJCCompatibilityTest.class, "LuaJC Compatibility Tests" ) );
|
||||
return suite;
|
||||
}
|
||||
|
||||
@@ -100,8 +100,8 @@ public class CompatibiltyTest extends TestSuite {
|
||||
System.setProperty("JME", "false");
|
||||
}
|
||||
}
|
||||
public static class LuaJCTest extends CompatibiltyTestSuite {
|
||||
public LuaJCTest() {
|
||||
public static class LuaJCCompatibilityTest extends CompatibiltyTestSuite {
|
||||
public LuaJCCompatibilityTest() {
|
||||
super(ScriptDrivenTest.PlatformType.LUAJIT);
|
||||
}
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
@@ -545,5 +545,15 @@ public class FragmentsTest extends TestSuite {
|
||||
" end\n" +
|
||||
"end\n");
|
||||
}
|
||||
|
||||
public void testUpvalueInDoBlock() {
|
||||
runFragment( LuaValue.NONE, "do\n"+
|
||||
" local x = 10\n"+
|
||||
" function g()\n"+
|
||||
" return x\n"+
|
||||
" end\n"+
|
||||
"end\n"+
|
||||
"g()\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ package org.luaj.vm2;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@@ -121,6 +122,8 @@ public class ScriptDrivenTest extends TestCase implements ResourceFinder {
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (FileNotFoundException e) {
|
||||
// Ignore and return null.
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user