re-apply my last two check-ins before the code structure refactoring:

(1) added getGlobals to returns the globals for Globals view in Eclipse
(2) fixed the scoping issue with stack state
(3) renamed DebugResponseStack to DebugResponseVariables
This commit is contained in:
Shu Lei
2007-11-08 01:55:27 +00:00
parent ff66779330
commit 25c008dab6
5 changed files with 244 additions and 202 deletions

View File

@@ -2,13 +2,10 @@ package org.luaj.debug;
import java.io.IOException;
import org.luaj.debug.SerializationHelper;
import org.luaj.debug.StackFrame;
import org.luaj.debug.TableVariable;
import org.luaj.debug.Variable;
import org.luaj.debug.response.DebugResponseCallgraph;
import org.luaj.debug.response.DebugResponseSimple;
import org.luaj.debug.response.DebugResponseStack;
import org.luaj.debug.response.DebugResponseVariables;
import org.luaj.vm.Lua;
import junit.framework.TestCase;
@@ -51,10 +48,10 @@ public class DebugResponseTest extends TestCase {
private void doTestDebugResponseStackSerialization(Variable[] variables)
throws IOException {
DebugResponseStack stackIn = new DebugResponseStack(variables);
DebugResponseVariables stackIn = new DebugResponseVariables(variables);
byte[] data = SerializationHelper.serialize(stackIn);
DebugResponseStack stackOut
= (DebugResponseStack) SerializationHelper.deserialize(data);
DebugResponseVariables stackOut
= (DebugResponseVariables) SerializationHelper.deserialize(data);
Variable[] variablesIn = stackIn.getVariables();
Variable[] variablesOut = stackOut.getVariables();
assertNotNull(variablesIn);