Saving test cases

In this section, you will learn how to save test cases for later usage.

  1. Double click in Expr.g file to open it with the ANTLR editor
  2. Select the Interpreter page
  3. Select the "prog" rule in the Rule Panel
  4. In the input text type: 3 + 6 enter
  5. Click on the "Save" button
  6. In the "Name" field type: simpleTest. Click OK
  7. The test is executed after you save it

  8. Now click on the "New test case" button
  9. In the input text type: 3 + 6
  10. Click on the "Save" button
  11. In the "Name" field type: simpleTestFail. Click OK
  12. The "prog" rule has two test case now
SourceForge.net Logo