edu.cornell.cs.sam.ui
Class TestScript.Test

java.lang.Object
  extended by edu.cornell.cs.sam.ui.TestScript.Test
All Implemented Interfaces:
Video
Enclosing class:
TestScript

public static class TestScript.Test
extends java.lang.Object
implements Video

Represents one single test


Nested Class Summary
static class TestScript.Test.CH
           
static class TestScript.Test.FLOAT
           
static class TestScript.Test.INT
           
static class TestScript.Test.MA
           
static class TestScript.Test.PA
           
 
Field Summary
protected  java.lang.Object actualReturnValue
           
protected  Program code
           
protected  boolean completed
           
protected  boolean delete
           
protected  java.lang.String fileName
           
protected  boolean ioSuccessful
           
protected  java.lang.Object returnValue
           
protected  java.util.Queue<java.lang.Object> rqueue
           
protected  TestScript scriptFile
           
protected  boolean stackCleared
           
protected  java.util.List<ProgramState> stateSteps
           
protected  java.util.Queue<java.lang.Object> wqueue
           
 
Constructor Summary
TestScript.Test(java.lang.String fileName)
           
 
Method Summary
 void addStep(ProgramState step)
           
 void addToRead(java.lang.Object o)
           
 void addToWrite(java.lang.Object o)
           
 void assemble()
           
 void clear()
           
 void delete()
           
 boolean error()
           
 java.lang.Object getActualReturnValue()
           
 Program getCode()
           
 java.io.File getFile()
           
 java.lang.String getFileName()
           
 java.util.Queue<java.lang.Object> getRead()
           
 java.lang.Object getReturnValue()
           
 TestScript getScriptFile()
           
 java.util.List<ProgramState> getStateSteps()
           
 java.util.Queue<java.lang.Object> getWrite()
           
 boolean isCompleted()
           
 boolean isIoSuccessful()
           
 boolean isStackCleared()
           
 char readChar()
          Request character input from the video implementation
 float readFloat()
          Request floating point input from the video implementation
 int readInt()
          Requests integer input from the video implementation
 java.lang.String readString()
          Request String input from the video implementation
 void resetState()
           
 int run(Sys sys, SamThread thread)
           
 void setFileName(java.lang.String string)
           
 void setRead(java.util.Collection<?> collection)
           
 void setReturnValue(java.lang.Object o)
           
 void setScriptFile(TestScript file)
           
 void setWrite(java.util.Collection<?> collection)
           
 void writeChar(char a)
          Writes character output to the video implementation
 void writeFloat(float a)
          Writes floating point output to the video implementation
 void writeInt(int a)
          Writes integer output to the video implementation
 void writeString(java.lang.String a)
          Writes string output to the video implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileName

protected java.lang.String fileName

rqueue

protected java.util.Queue<java.lang.Object> rqueue

wqueue

protected java.util.Queue<java.lang.Object> wqueue

returnValue

protected java.lang.Object returnValue

completed

protected boolean completed

actualReturnValue

protected java.lang.Object actualReturnValue

ioSuccessful

protected boolean ioSuccessful

stackCleared

protected boolean stackCleared

delete

protected boolean delete

stateSteps

protected java.util.List<ProgramState> stateSteps

scriptFile

protected TestScript scriptFile

code

protected Program code
Constructor Detail

TestScript.Test

public TestScript.Test(java.lang.String fileName)
Method Detail

clear

public void clear()

addToRead

public void addToRead(java.lang.Object o)

addToWrite

public void addToWrite(java.lang.Object o)

getRead

public java.util.Queue<java.lang.Object> getRead()

getWrite

public java.util.Queue<java.lang.Object> getWrite()

getFileName

public java.lang.String getFileName()

getFile

public java.io.File getFile()

getReturnValue

public java.lang.Object getReturnValue()

setFileName

public void setFileName(java.lang.String string)

setReturnValue

public void setReturnValue(java.lang.Object o)

getActualReturnValue

public java.lang.Object getActualReturnValue()

isCompleted

public boolean isCompleted()

isIoSuccessful

public boolean isIoSuccessful()

delete

public void delete()

error

public boolean error()

isStackCleared

public boolean isStackCleared()

getStateSteps

public java.util.List<ProgramState> getStateSteps()

addStep

public void addStep(ProgramState step)

resetState

public void resetState()

getScriptFile

public TestScript getScriptFile()

setScriptFile

public void setScriptFile(TestScript file)

setRead

public void setRead(java.util.Collection<?> collection)

setWrite

public void setWrite(java.util.Collection<?> collection)

assemble

public void assemble()
              throws TestScript.TestScriptException
Throws:
TestScript.TestScriptException

getCode

public Program getCode()
                throws TestScript.TestScriptException
Throws:
TestScript.TestScriptException

run

public int run(Sys sys,
               SamThread thread)
        throws TestScript.TestScriptException
Throws:
TestScript.TestScriptException

readInt

public int readInt()
Description copied from interface: Video
Requests integer input from the video implementation

Specified by:
readInt in interface Video
Returns:
The integer received

readString

public java.lang.String readString()
Description copied from interface: Video
Request String input from the video implementation

Specified by:
readString in interface Video
Returns:
The String received

readChar

public char readChar()
Description copied from interface: Video
Request character input from the video implementation

Specified by:
readChar in interface Video
Returns:
The character received

readFloat

public float readFloat()
Description copied from interface: Video
Request floating point input from the video implementation

Specified by:
readFloat in interface Video
Returns:
The floating point number received

writeInt

public void writeInt(int a)
Description copied from interface: Video
Writes integer output to the video implementation

Specified by:
writeInt in interface Video
Parameters:
a - The integer to be written

writeFloat

public void writeFloat(float a)
Description copied from interface: Video
Writes floating point output to the video implementation

Specified by:
writeFloat in interface Video
Parameters:
a - The float to be written

writeChar

public void writeChar(char a)
Description copied from interface: Video
Writes character output to the video implementation

Specified by:
writeChar in interface Video
Parameters:
a - The character to be written

writeString

public void writeString(java.lang.String a)
Description copied from interface: Video
Writes string output to the video implementation

Specified by:
writeString in interface Video
Parameters:
a - The string to be written