Unit tests and refactored code for the Terrain package - Bas de Böck & Alexander Grooff#14
Open
AlexanderGrooff wants to merge 1 commit intodelftsre:masterfrom
Open
Unit tests and refactored code for the Terrain package - Bas de Böck & Alexander Grooff#14AlexanderGrooff wants to merge 1 commit intodelftsre:masterfrom
AlexanderGrooff wants to merge 1 commit intodelftsre:masterfrom
Conversation
* Initial structure for TerrainQuadTest * Added test for getQuad * Tests for all children of root for findRightQuad * Added tests for findDown, Left and Top quad * Added parent findQuad tests * lod test * lod test * Added FakeTerrainQuad with public getQuad method * Added method to create nested quads * Tests for all children of root for findRightQuad * Added tests for findDown, Left and Top quad * Added parent findQuad tests * lod test * lod test * Changed tests to cover everything except useFinder lines * Added test for getPatch * Added exception variable and tests for findRightPatch * Added null checks to getPatch and findRightPatch tests * Refactoring and Testing of createQuadPatch method in TerrainQuad. * Fixed exception assertion in patch tests * Added final patch tests * First step of refactoring findQuad * Improved readability of findQuad, added test to compare new methods to old findQuad methods * Added functionality for neighbourfinder in all directions * createQuadPatch is refactored to setPatchChildren * Added Javadoc to the createQuadPatch methods. * Added testclass for NeighbourFinder * Add test for using NeighbourFinder in findQuad * Refactored findDownQuad etc to findQuad(dir) in tests, and assured 100% coverage for findQuad(dir) * Deprecated all findXQuad() methods * Refactored to findPatch methods in TerrainPatch * Added comparison tests between old code and refactored code * Removed dead test code * Added deprecated tags to old code * Set deprecated code back to tests and the code itself * Added test coverage for the NeighbourFinder in the legacy code * Reversed legacy code to its original code * Changed existing code to use the new findPatch method * testGetHeightmapHeight * TerrainQuadTest updated * Created new class QuadrantFinder to reduce duplicate code * Removed unused field `i` from QuadrantFinder class * Removed most duplicate code between fixEdges and findNeighboursLod * created getHeight test, to test the private method findMatchingChild (only place this is called is in getHeight method). * fixed javadoc for tests * Reverted refactorings merge * Fixed auto-merge issues related to test_calculateLod * changed name of testCalculateLod to testHasLodChanged. * hasLodChanged javadoc. * Added names to createNestedQuad, added first test for fixEdges * Improved testFixEdges * Added test for findNeighboursLod * Added test for all setLod methods in UTP * Added setLod with test * Added getNeighbours to TerrainPatch and refactored fixEdges * Refactored findNeighboursLod * Updated JavaDoc * Fixed createNestedQuad update * Small bugfix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Authors: Bas de Böck (@BdeBock) & Alexander Grooff (@AlexanderGrooff).
Added various unit test cases and refactored code of the TerrainQuad, TerrainPatch, and UpdatedTerrainPatch classes.