Skip to content

feat: Add movement unit tests#12648

Open
boskoramen wants to merge 1 commit into
cmss13-devs:masterfrom
boskoramen:movement-unit-tests
Open

feat: Add movement unit tests#12648
boskoramen wants to merge 1 commit into
cmss13-devs:masterfrom
boskoramen:movement-unit-tests

Conversation

@boskoramen

@boskoramen boskoramen commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Add unit tests to validate behavior for collisions on move and for link blocked calls

About the pull request

Adds unit tests validating collision and linked blocked behavior

Extracted from this PR: https://github.com/cmss13-devs/cmss13/pull/7138/changes

Explain why it's good for the game

Unit testing is good

Testing Photographs and Procedure

Happy path unit test results on VS Code image
All movement blocked unit test results on VS Code Code_IAzCgCuQdV
All movement allowed unit test results on VS Code Code_KXWRCPztWQ

Changelog

🆑
add: Movement unit tests
/:cl:

Add unit tests to validate behavior for collisions on move and for link blocked calls
@github-project-automation github-project-automation Bot moved this to Awaiting Review in Review Backlog Jul 14, 2026
@cmss13-ci cmss13-ci Bot added Feature Feature coder badge size/XL Denotes a PR that changes 799-1999 lines, ignoring generated files. labels Jul 14, 2026
@fira

fira commented Jul 14, 2026

Copy link
Copy Markdown
Member

Why not do the tests with an human rather than a movable to throw even more failure conditions in the loop? But either way this is great. Did you try to fail it selectively too?

@boskoramen

Copy link
Copy Markdown
Contributor Author

Why not do the tests with an human rather than a movable to throw even more failure conditions in the loop?

Wanted to just setup basic tests for parent movable since most of the logic that would cause a collision/link block are coming from the blockers rather than the mover.

We can always build on top of these basic tests to validate logic for specific blockers (e.g., cargo flaps) and movers (e.g., observers).

Did you try to fail it selectively too?

Good idea, I did selective failing by allowing all movement/blocking all movement and updated testing screenshots with those runs + code changes.

@boskoramen

Copy link
Copy Markdown
Contributor Author

Looks like I didn't update description with the other unit tests runs, updated it

@fira

fira commented Jul 18, 2026

Copy link
Copy Markdown
Member

Neato. I need to sit and review this thoroughly at some point, it's quite beefy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Feature coder badge size/XL Denotes a PR that changes 799-1999 lines, ignoring generated files.

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

2 participants