Add LValue.toJavaX and VM.pushboxedx() functions for all java basic type conversions
This commit is contained in:
@@ -39,7 +39,7 @@ public class LoadStateTest extends TestCase {
|
||||
long bits = Double.doubleToLongBits( v );
|
||||
LNumber luaNumber = LoadState.longBitsToLuaNumber( bits );
|
||||
|
||||
assertEquals( v, luaNumber.luaAsDouble(), 0 );
|
||||
assertEquals( v, luaNumber.toJavaDouble(), 0 );
|
||||
|
||||
if ( v != Integer.MIN_VALUE ) {
|
||||
// Special case of MIN_VALUE is probably not worth dealing with.
|
||||
|
||||
@@ -66,7 +66,7 @@ public class LTableTest extends TestCase {
|
||||
LValue k = keys[i];
|
||||
|
||||
if ( k instanceof LInteger ) {
|
||||
final int ik = k.luaAsInt();
|
||||
final int ik = k.toJavaInt();
|
||||
assertTrue( ik >= 0 && ik < 10 );
|
||||
final int mask = 1 << ik;
|
||||
assertTrue( ( intKeys & mask ) == 0 );
|
||||
|
||||
Reference in New Issue
Block a user