Class ExprTest
java.lang.Object
ExprTest
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidassertEquals(Object actual, Object expected) assert that `actual.equals(expected)`.voidJust like `System.err.printf` but for debugging-output; comment out its body to disable.voidstatic voidManually call our test-functions (in case calling JUnit from your IDE isn't easy).voidsetUp()Sets up the test fixture.voidtearDown()Tears down the test fixture.voidtestEval()For every element in allTests, parse the string and eval the result, checking that we get back the second item in the pair.voidvoidFor every element in allTests, parse the string, and then call toString on the result, checking that we get back exactly the input string (up to whitespace).void
-
Field Details
-
Constructor Details
-
ExprTest
public ExprTest()
-
-
Method Details
-
main
Manually call our test-functions (in case calling JUnit from your IDE isn't easy). -
testMyStuff
public void testMyStuff() -
testTowardsAutomating
public void testTowardsAutomating() -
setUp
public void setUp()Sets up the test fixture. Called before every test case method. -
testParseToString
public void testParseToString()For every element in allTests, parse the string, and then call toString on the result, checking that we get back exactly the input string (up to whitespace). -
testEval
public void testEval()For every element in allTests, parse the string and eval the result, checking that we get back the second item in the pair. If the second item is a Java Number, convert it to an OG0 Num, and leave the double-comparison to Num.equals(Object). -
logPassedTest
public void logPassedTest() -
tearDown
public void tearDown()Tears down the test fixture. Called after every test case method. -
assertEquals
-
dbg
Just like `System.err.printf` but for debugging-output; comment out its body to disable. (This same method might be repeated in multiple classes, so that you turn messages on/off on a per-file basis.)- Parameters:
fmt- the format stringinfos- Any data needed by the `fmt` (one item per '%' in `fmt`)- See Also:
-