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

Overhaul of Various TreeTent Tests (Current Tests in Pull Request: 4) #635

Merged
merged 10 commits into from
Oct 17, 2023

Conversation

Rorymar
Copy link
Collaborator

@Rorymar Rorymar commented Oct 10, 2023

Description

Overhauled the tests for the NoTreeForTent and TouchingTents part of the Test Suite (As such, it is related to those issues) For TouchingTents, added testing of various directional orientations to see if that affected the results and simultaneous occurrences of adjacent and diagonal contradiction. For NoTreeForTent, added testing of various orientations similar to how was implemented for TouchingTents, but also tested with some 3x3 situations.

Closes [Test] Touching Tents Test
Closes [Test] No Tree for Tent Test

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?

Ran the tests and ensured they all passed. To verify I was only looking at the exact tests I was working on, I used this process:

  1. Went to LEGUP > test > java > puzzles > treetent.rules
  2. Right-clicked a Test, for example, TouchingTentContradictionRuleTest.java
  3. Pressed 'Run' in the right-click options
  4. Observe the result

I then made sure the number of passed tests matched the tests tested. I also ran the entire test suite from LEGUP > test, and that also produced no non-functional tests.

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

Rorymar and others added 8 commits September 29, 2023 17:16
Improved the Diagonal and Adjacency Tests to verify different orientations all work.
Added tests for a combination of diagonals and adjacents.
Added tests to the TouchingTents tests that made sure trees do not trigger this contradiction.
Added Files for NoTreeForTent Tests, and test cases for the basic 2x2 Tests. Also fixed some spacing in the TouchingTents Test File.
Added more complex 3x3 tests to the NoTreeForTents. Fixed an error with the 2x2 Tests
* Region Based Changes (Bram-Hub#559)

Co-authored-by: Hanson Gu <[email protected]>

* Short Truth Table Puzzle Editor (Bram-Hub#451)

* Created files for STT elements

* Renamed Tiles classes to Elements to match package name

Also added an elements reference sheet and renamed rules reference sheet accordingly

* More progress made

This won't compile, just saving progress made

* More progress being made

* Fixed file name typo and added placeholder tiles

* Added image paths

* Created element classes and added placeholder tile images (Bram-Hub#452)

* Renamed Tiles classes to Elements to match package name

Also added an elements reference sheet and renamed rules reference sheet accordingly

* More progress made

This won't compile, just saving progress made

* More progress being made

* Fixed file name typo and added placeholder tiles

* Added image paths

* Set the current board on boardView

* Fixed typo and turned on STT puzzle editor for testing

* Added preliminary valid dimensions checker

This will most definitely change in the future, hopefully can change to accept a number of statements

* Fixed image file paths

* Added ActionListener

Allows us to determine what puzzle is selected by the user

* Hide rows and columns input for Short Truth Table

* Added text area for Short Truth Table

* Added scrollbars to show up as needed

* Reformatted code

* More code reformatting

* Even more reformatting

* Separate the data from the TextArea into different lines

* Did some researching/testing

Tested certain variable values with a STT file with no true/false values

* Made more progress

Added new methods to handle creating Short Truth Table boards from an array of strings

* Added a bunch of TODOs

- Implemented a couple functions to be used later
- Added a bunch of TODO comments for future work

* Made some more progress

* Implemented abstract methods from PuzzleImporter

* Added abstract methods to Fillapix and added other exception reporting

* CheckStyle formatting

* Removed a TODO comment

* Statements show up in puzzle editor

Fixed a bug where the importer was not properly being initialized. Statements now show up in the puzzle editor.

* Removed empty statements

* Changed InvalidFormatException to IllegalArgumentException

* Remove argument that has already been caught

* Removed elements that will not be used

* Added puzzle editor cell clicking functionality

* Added ability to toggle certain logical elements

* New icons and more functionality implemented

* Fixed a bug where spacer rows could be modified

* Added statement error checking

* Fixed formatting

* Only one logic symbol element needed

* Changed InputMismatchException to UnsupportedOperationException

* Renamed variables to not be STT specific

* Finding initial issue and starting fix

* Issue is statement copying and modifying

* STT exporter now working. Overrode setCell for STTBoard.

* Added code documentation

* removed testing println()

* Gradle fixes

* Revert "Merge pull request Bram-Hub#545 from MMosley502/puzzle_editor-short_truth_table-file_saving"

This reverts commit 2e82547, reversing
changes made to beb60a2.

* Saving files now works

* Fixed the blank element to be categorized as a placeable element

* Fixed a bug where file wouldn't save due to batch grader updates

* Reformatted code in STT

* Reformatted code again

* MORE REFORMATTING

Pls like my code CheckStyle

---------

Co-authored-by: Matthew Mosley <[email protected]>
Co-authored-by: MMosley502 <[email protected]>

* Have null changes be valid and fix IsolatedBlackContradicitonRule error message (Bram-Hub#561)

* Get Tests to be called

Revert "Create first cypress test template"

This reverts commit 3e50909.

First commit

Finish Lightup tests

* Add more tests

Update TestRunner.java

* Somehow ended up in the wrong spot

Fix Import

* Please let this be the fix

Update TreeTransition.java

Update TreeTransition.java

Update DirectRule.java

Check to see which is not correct

Update ElementController.java

Revert "maybe the null is making it think that it's not valid"

This reverts commit 7bf1de0d66ced6749ee37fbb9c252636b2fcdc79.

Just trying to change color

Revert "Just trying to change color"

This reverts commit ec44695ee578d664055d135a668927a0fd900f5d.

Revert "maybe the null is making it think that it's not valid"

This reverts commit 3f162fbdc32e6fbd23da321a14a6af96f0ff520d.

Check to see which is not correct

Revert "Check to see which is not correct"

This reverts commit 136b0a41b9d103e6f3e9a7f8cd5d970bf76b050b.

Update TreeTransition.java

Update TreeTransition.java

Revert "Update TreeTransition.java"

This reverts commit cde45bb9001cfbfa4f6e2a49b4e9990d2fa7ad33.

* Fix error with isolated Black

Fix error message with isolated black

* Removed excess whitespace and imports. Added short JavaDoc for `TestRunner.java`

---------

Co-authored-by: Charles Tian <[email protected]>
Co-authored-by: Bram van Heuveln <[email protected]>
Co-authored-by: Corppet <[email protected]>

* Fixed a bug

* Update BlackTile.java

Black tile should not be placeable

* Added unknown tile stuff

* ID error

* Some Fixes to Recently Discussed UX Bugs (Bram-Hub#563)

* frame and panels default sizes, default pos on screen

* hardcoded version number

* homepanel default size

* set panels' own sizes

* some changes

* Removed unused import

---------

Co-authored-by: Charles Tian <[email protected]>
Co-authored-by: Corppet <[email protected]>

* Oops pushed the wrong file

Yeah some tiles work now but this is the ID error

* Number Tile working

* Update Exporter (Bram-Hub#627)

* Update Exporter

* Delete Test_Save

---------

Co-authored-by: Charles Tian <[email protected]>

* Create run-tests.yml

* Update run-tests.yml

* Update run-tests.yml

* Update run-tests.yml

* Update run-tests.yml

* Windows things

* Added print messages

* More Windows things

* Debugging

* Update run-tests.yml

* Update run-tests.yml

* Maybe this will work now?

* Didn't work

* Update run-tests.yml

* Update run-tests.yml

* Create DummyTest.java

For debugging purposes

* Added another dummy test

* Update run-tests.yml

* Update run-tests.yml

Get rid of all this info

* Deleted the dummy tests

---------

Co-authored-by: Antonio Orta <[email protected]>
Co-authored-by: Hanson Gu <[email protected]>
Co-authored-by: Charles Tian <[email protected]>
Co-authored-by: Matthew Mosley <[email protected]>
Co-authored-by: MMosley502 <[email protected]>
Co-authored-by: Viane Matsibekker <[email protected]>
Co-authored-by: Bram van Heuveln <[email protected]>
Co-authored-by: Corppet <[email protected]>
Co-authored-by: charlestian23 <[email protected]>
Co-authored-by: ThisMatt <[email protected]>
Added NoTentForTree Tests involving more complex instances for the contradiction to consider.
@jac-oblong jac-oblong self-assigned this Oct 13, 2023
Added tests for the SurroundTestWithGrass direct rule
@Rorymar
Copy link
Collaborator Author

Rorymar commented Oct 13, 2023

I added some additional Tests to my branch, so here is the information for them:

Description

Overhauled the tests for the NoTentForTree and Surround With Grass part of the Test Suite. For NoTentForTree, added some tests for specifically diagonal and adjacent failures, and a test where one tent was ok, but one was not. For Surround, added extreme case tests that looked at puzzles with absolutely nothing but a tent in the middle of a 3x3, and another with a 3x3 with a tent completely surrounded by trees.

Closes [Test] No Tent for Tree Test
Closes [Test] Surround Test With Grass Test

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? (Same as original process)

Ran the tests and ensured they all passed. To verify I was only looking at the exact tests I was working on, I used this process:

  1. Went to LEGUP > test > java > puzzles > treetent.rules
  2. Right-clicked a Test, for example, TouchingTentContradictionRuleTest.java
  3. Pressed 'Run' in the right-click options
  4. Observe the result

I then made sure the number of passed tests matched the tests tested. I also ran the entire test suite from LEGUP > test, and that also produced no non-functional tests.

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

@Rorymar Rorymar changed the title Overhaul of NoTreeForTent and TouchingTents Tests Overhaul of Various TreeTent Tests (Current Tests in Pull Request: 4) Oct 13, 2023
@jac-oblong
Copy link
Collaborator

Please change the destination of the PR to Bram-Hub:dev instead of Bram-Hub:master

@Rorymar Rorymar changed the base branch from master to dev October 13, 2023 21:36
@jac-oblong
Copy link
Collaborator

I'm not entirely sure what happened, but when the PR was opened only ~28 files were changed. There are currently 89 files that are changed, many of them not related to the PR topic.

@Rorymar
Copy link
Collaborator Author

Rorymar commented Oct 17, 2023

I'm not entirely sure what happened, but when the PR was opened only ~28 files were changed. There are currently 89 files that are changed, many of them not related to the PR topic.

I believe it is the October Merge that is causing that numerical change, which occurred while I was working on my changes.

@charlestian23
Copy link
Collaborator

Fixed the ~89 files issue, you can review it now @jac-oblong

@charlestian23
Copy link
Collaborator

@Rorymar Ivan just merged #648, which is where I deleted a bunch of files that shouldn't be in the repo. All the merge conflicts you see should just be files that were in build. To resolve them, you can just safely delete all of them.

Copy link
Collaborator

@jac-oblong jac-oblong left a comment

Choose a reason for hiding this comment

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

Everything looks good

@jac-oblong jac-oblong merged commit ff0024d into Bram-Hub:dev Oct 17, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants