Class SelfScoredOracle
- java.lang.Object
-
- edu.odu.cs.zeil.codegrader.oracle.Oracle
-
- edu.odu.cs.zeil.codegrader.oracle.SelfScoredOracle
-
public class SelfScoredOracle extends Oracle
An oracle that scans the output for the score. Each line is matched against a pattern that must supply a named capturing group "pts" and, optionally, a named capturing group "poss". If the pattern provides only pts, the match is considered to be the score. If the pattern provides both pts and poss, the score is 100*pts/poss. The patten is applied to each line of the out. It can match a substring of that line. The last line of observed output containing a match to the pattern is the one that is used.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.odu.cs.zeil.codegrader.oracle.Oracle
Oracle.ScoringOptions
-
-
Field Summary
-
Fields inherited from class edu.odu.cs.zeil.codegrader.oracle.Oracle
PASSED_TEST_MESSAGE
-
-
Constructor Summary
Constructors Constructor Description SelfScoredOracle(OracleProperties config, TestCase testCase, Submission submission, Stage submitterStage)
Create a new oracle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OracleResult
compare(java.lang.String expected, java.lang.String actual)
Compare two strings to see if one is an acceptable variant of the other.-
Methods inherited from class edu.odu.cs.zeil.codegrader.oracle.Oracle
getCap, getCommand, getIgnoreCase, getIgnoreEmptyLines, getIgnorePunctuation, getIgnoreWS, getNumbersOnly, getPattern, getPrecision, getScoring, getStage, getSubmission, getTestCase
-
-
-
-
Constructor Detail
-
SelfScoredOracle
public SelfScoredOracle(OracleProperties config, TestCase testCase, Submission submission, Stage submitterStage)
Create a new oracle.- Parameters:
config
- configuration propertiestestCase
- the test case to which this oracle will applysubmission
- the submission being judgedsubmitterStage
- the stage where the submitted code has been built
-
-
Method Detail
-
compare
public OracleResult compare(java.lang.String expected, java.lang.String actual)
Compare two strings to see if one is an acceptable variant of the other. The precise meaning of "acceptable" depends on the settings.
-
-