|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
lp.parse.LpParserTest
lp.parse.EvolpParserTest
public class EvolpParserTest
Contains tests of the EvolpParser class.
EvolpParser| Field Summary | |
|---|---|
private LpRule |
evolpRule
A container for the rule constructed by LpParserTest.getRule2(). |
| Fields inherited from class lp.parse.LpParserTest |
|---|
parser, printer |
| Constructor Summary | |
|---|---|
EvolpParserTest(String testName)
A default test case constructor. |
|
| Method Summary | |
|---|---|
protected LpRule |
getEvolpRule()
Returns a rule corresponding to the string "human(X) :- lives(X), not colour(green, X), not assert(dead(X) <-)." |
void |
testEvolpRule()
Tests the EVOLP parser on an input containing the rule returned by getEvolpRule(). |
void |
testEvolpRulesFromFile()
Parses EVOLP rules from a file and checks that they are what they should be (through the LpAbstractStructureUnit.toString() method) |
void |
testParseEvolp()
Tests the EvolpParser.parseEvolp() method. |
| Methods inherited from class lp.parse.LpParserTest |
|---|
doRulesFromFileTest, getRule1, getRule2, testBothRules, testExceptions, testInvalidRule, testNormalRule, testPropositionalRule, testRulesFromFile, testSetInputExceptions |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private LpRule evolpRule
LpParserTest.getRule2().
| Constructor Detail |
|---|
public EvolpParserTest(String testName)
testName - the name of the test case| Method Detail |
|---|
protected LpRule getEvolpRule()
"human(X) :- lives(X), not colour(green, X), not assert(dead(X) <-)."
public void testEvolpRule()
getEvolpRule().
IOException - (wrapped in an ExceptionAdapter) if
an I/O exception occurs while parsing the input (should never happen)
if - a LpParserException is thrown while parsing the input
(should never happen)
public void testEvolpRulesFromFile()
throws IOException
LpAbstractStructureUnit.toString() method)
IOException - (wrapped in an ExceptionAdapter) if
an I/O exception occurs while parsing the input (should never happen)
if - a LpParserException is thrown while parsing the input
(should never happen)public void testParseEvolp()
EvolpParser.parseEvolp() method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||