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

Add some tests for NPC rules #78524

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Dec 12, 2024

Summary

None

Purpose of change

NPC test coverage is lacking...

Describe the solution

Expand it.

Describe alternatives you've considered

Testing

This is the test.

Additional context

The lock doors rule test only tests vehicle doors because the rule does not consider terrain doors. This is pre-existing behavior.

Although it spends some time setting up actual terrain to check this, I've commented out the check that verifies the behavior is correct, as it will currently fail.

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` labels Dec 12, 2024
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Dec 12, 2024
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Dec 13, 2024
@github-actions github-actions bot removed the json-styled JSON lint passed, label assigned by github actions label Dec 13, 2024
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Dec 13, 2024
@RenechCDDA RenechCDDA marked this pull request as ready for review December 14, 2024 16:23
@RenechCDDA
Copy link
Member Author

I've marked this ready to review as it adds three new test cases which cover existing scenarios which need coverage.

There are definitely more NPC rules which need test coverage, and I hope to add other tests for them, but I don't want to leave this in draft forever. Better to get the working ones merged and add more as we can

@RenechCDDA RenechCDDA force-pushed the npc_behavior_tests branch 2 times, most recently from 53f8a4e to 5caefb3 Compare December 14, 2024 18:09
(sting id naming)
(string id *sorting*)
(test names don't include special chars)
+ Clean up some UB
+ Remove now misleading comment
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 15, 2024
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant