Bram-Hub / LEGUP

Logic Engine for Grid-Using Puzzles - a better way to learn formal logic
GNU General Public License v3.0
33 stars 82 forks source link

Added more Short Truth Table tests #675

Closed charlestian23 closed 11 months ago

charlestian23 commented 11 months ago

Description

Added tests for Biconditional Elimination, Conditional Elimination, and Not Elimination. One of the tests for Not Elimination is commented out because it fails, but that seems to be correct, as there does seem to be a bug with the rule (see #684).

Type of change

How Has This Been Tested?

Checklist:

charlestian23 commented 11 months ago

For the first question, no. I forgot about those test cases and will add them shortly. For the second question, I figured they would be symmetric, but I will add test cases for them too just in case.

charlestian23 commented 11 months ago

@Bram28 I just added in more tests for the conditional case and biconditional cases you mentioned.

charlestian23 commented 11 months ago
puzzles.shorttruthtable.rules.NotEliminationTest > CannotSetBothAtOnceTest FAILED
    java.lang.NullPointerException at NotEliminationTest.java:120

Even if this is the intended behavior, the unit test should be marked as passed, otherwise this could interfere with future checks on other pull requests.

Commented out the test case, I'll make a note in #684 that the test case should be uncommented once the issue is fixed.