Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lp.parse
Class LpParserTest2

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              lp.struct.util.LpPrettyPrinterTest
                  lp.parse.LpParserTest2

All Implemented Interfaces:
  Test

Direct Known Subclasses:
  EvolpParserTest2

    public class LpParserTest2

extends LpPrettyPrinterTest

Contains a test of the `LpParser` class that reuses data from `LpPrettyPrinterTest`.

Version:
  1.0.0
Author:
  Martin Slota
See Also:
  `LpParser`, `LpPrettyPrinterTest`

Field Summary
`protected LpParser` | `parser` The `LpParser` instance used in the tests.

Fields inherited from class lp.struct.util.LpPrettyPrinterTest
`expContents, expContents2, pp, pp2, r`

Constructor Summary
`LpParserTest2(String testName)` A default test case constructor.

Method Summary
`protected void` | `doTest(String source, LpStructureUnit expected)` Gives `source` to the parser and expects `expected` to be returned.

Methods inherited from class lp.struct.util.LpPrettyPrinterTest
`setUp, testAppendCompoundTerm, testAppendConstant, testAppendFunction, testAppendLiteral, testAppendNull, testAppendPredicate, testAppendRule, testAppendVariable, testAsString`

Methods inherited from class junit.framework.TestCase
`countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

### parser

    protected LpParser parser

  The `LpParser` instance used in the tests.

Constructor Detail

### LpParserTest2

    public LpParserTest2(String testName)

  A default test case constructor.

  Parameters:
    `testName` - the name of the test case

Method Detail

### doTest

    protected void doTest(String source,
                          LpStructureUnit expected)

  Gives `source` to the parser and expects `expected` to be returned. Only does something if `expected` is an instance of `LpRule`, `LpTerm` or `LpLiteral`.

  Overrides:
    `doTest` in class `LpPrettyPrinterTest`
  Parameters:
    `source` - the source string that will be parser
    `expected` - the expected `LpStructureUnit`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD