net.codescore.exe
Class Tester

java.lang.Object
  extended by net.codescore.exe.Tester
All Implemented Interfaces:
Runnable

public class Tester
extends Object
implements Runnable

Pipes test cases to a running submission

Author:
Adam Cornett

Field Summary
private  List<TestCase> cases
           
private  org.apache.commons.logging.Log log
           
private static int maxByteCount
           
private  GradingMode mode
           
private  Process myProcess
           
private  Submission sub
           
 
Constructor Summary
Tester(Submission s, GradingMode gm, Process proc)
           
 
Method Summary
private  void pipeAllTestCases()
          Get all test cases for this problem and pipe their input to stdIn.
private  void pipeSampleTestCases()
          Send just the problem's sample data to the submission
 void run()
           
 void test()
          Start the test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxByteCount

private static final int maxByteCount
See Also:
Constant Field Values

cases

private List<TestCase> cases

log

private org.apache.commons.logging.Log log

mode

private final GradingMode mode

myProcess

private final Process myProcess

sub

private final Submission sub
Constructor Detail

Tester

public Tester(Submission s,
              GradingMode gm,
              Process proc)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

test

public void test()
Start the test


pipeAllTestCases

private void pipeAllTestCases()
Get all test cases for this problem and pipe their input to stdIn. Pipe the expected output to the expected output file.

Throws:
IOException

pipeSampleTestCases

private void pipeSampleTestCases()
Send just the problem's sample data to the submission



Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.