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

test: add basic pathfinding test cases #27

Merged
merged 8 commits into from Feb 13, 2022

Conversation

jdrueckert
Copy link
Member

@jdrueckert jdrueckert commented Feb 12, 2022

Extract many tests cases from Terasology/Behaviors#92 to tests on the pathfinding itself.

Most importantly, this allows us to run these tests as unit tests instead of long-running integration tests using MTE.

@jdrueckert jdrueckert added Type: Improvement Request for or addition/enhancement of a feature Category: Test/QA Requests, Issues and Changes targeting tests and quality assurance Topic: AI Requests, Issues and Changes related to pathfinding, behaviors, etc. labels Feb 12, 2022
@jdrueckert jdrueckert self-assigned this Feb 12, 2022
package org.terasology.flexiblepathfinding.helpers;

public final class TestPaths {
public static final String[] singleFlatStepNorthPath = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Checkstyle wants you to write this as

Suggested change
public static final String[] singleFlatStepNorthPath = {
public static final String[] SINGLE_FLAT_STEP_NORTH_PATH= {

not sure this is better... maybe we should disable checkstyle for the whole file?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm okay with both

jdrueckert and others added 2 commits February 13, 2022 11:58
Co-authored-by: Tobias Nett <skaldarnar@googlemail.com>
- add documentation to WalkingJPSTest
- add positive test case to LeapingJPSTest and FallingJPSTest
- fix checkstyle issues
@jdrueckert jdrueckert changed the title test: add basic test cases test: add basic pathfinding test cases Feb 13, 2022
@jdrueckert jdrueckert merged commit 660d9bc into develop Feb 13, 2022
@jdrueckert jdrueckert deleted the test/add-basic-test-cases branch February 13, 2022 11:12
@jdrueckert
Copy link
Member Author

skaldarnar added a commit to Terasology/Behaviors that referenced this pull request Mar 13, 2022
- style: format `.behavior` files
- chore: add TODO ideas and questions in several places
- chore: add some debug logging
- feature/fix: small adjustments to Behaviors logic

Follow-up PR to #89.

Related PRs (extracted from this): #94, #96, #97, #99.

Contributes to MovingBlocks/Terasology#4981.

Depends on Terasology/FlexiblePathfinding#26 and Terasology/FlexiblePathfinding#27.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Test/QA Requests, Issues and Changes targeting tests and quality assurance Topic: AI Requests, Issues and Changes related to pathfinding, behaviors, etc. Type: Improvement Request for or addition/enhancement of a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants