Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more Short Truth Table tests #675

Merged
merged 51 commits into from
Nov 7, 2023

Conversation

charlestian23
Copy link
Collaborator

@charlestian23 charlestian23 commented Oct 27, 2023

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an already existing feature)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes

Copy link
Member

@Bram28 Bram28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the conditional case A -> B where the -> is false: does it check that it is ok to just set A to true or just set B to false?

For the biconditional A <-> B: you have tests where A and <-> have given truth-values ... do you need to add tests where <-> and B have given truth-values? It should be completely symmetrical, but still ...

@charlestian23
Copy link
Collaborator Author

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 charlestian23 requested a review from Bram28 November 3, 2023 21:11
@charlestian23
Copy link
Collaborator Author

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

Copy link
Collaborator

@Corppet Corppet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@charlestian23
Copy link
Collaborator Author

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.

@charlestian23 charlestian23 requested a review from Corppet November 7, 2023 22:24
@Corppet Corppet merged commit 3ea1346 into Bram-Hub:dev Nov 7, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants