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

Made the speed tie test use PASSES_RANDOMLY #5092

Merged
merged 6 commits into from
Aug 13, 2024

Conversation

hedara90
Copy link
Collaborator

@hedara90 hedara90 commented Aug 5, 2024

Description

Made the speed ties test utilize PASSES_RANDOMLY instead of a large PARAMETRIZE.
This method utilizes the properties of the moves Endeavor, Super Fang, Crush Grip and Life Dew along with chosen max/starting HP value of the player Pokemon and chosen Atk/Def values to make calculation easier.
Final HP values of Mon1 and Mon2 were calculated manually then verified in the test runner after a setup had been finalized.

Discord contact info

hedara

test/battle/move.c Outdated Show resolved Hide resolved
@hedara90 hedara90 added the category: battle-tests Related to the automated test environment label Aug 5, 2024
@hedara90 hedara90 requested a review from mrgriffin August 8, 2024 07:08
test/battle/move.c Outdated Show resolved Hide resolved
@@ -719,6 +719,7 @@ struct BattleTestRunnerState
u8 checkProgressParameter;
u8 checkProgressTrial;
u8 checkProgressTurn;
u32 occurenceCounter;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll have a think today about if there's something cleaner than adding a member to the test runner that's only used by one test.

test/battle/move.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@mrgriffin mrgriffin left a comment

Choose a reason for hiding this comment

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

Thanks for your work! A 24x speed improvement is amazing 🎉

@mrgriffin mrgriffin merged commit cfa7316 into rh-hideout:master Aug 13, 2024
1 check passed
@hedara90 hedara90 deleted the speed-tie-test branch August 13, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: battle-tests Related to the automated test environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants