Skip to content

Add the missing NewFloatSliceResult for testing #3393

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

AndBobsYourUncle
Copy link
Contributor

When I was developing for another project, I ran into a situation in which I needed to test ZMScore in my unit tests.

However, I found out that there existed no helper method that returned a mocked FloatSliceCmd with a populated result.

After digging into the code, it looked to me like there existed NewStringSliceResult, NewBoolSliceResult, but no NewFloatSliceResult method.

This PR simply adds that method so that it can be used for testing in other projects.

Copy link
Member

@ndyakov ndyakov left a comment

Choose a reason for hiding this comment

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

Hello @AndBobsYourUncle , this looks good, thank you for the contribution. I know it may seem useless, but would you mind adding tests for all New*Result functions in this file? I can do it in a separate PR for the existing ones, and you can add just for the NewFloatSliceResult if you don't have the time.

@ndyakov
Copy link
Member

ndyakov commented Jun 3, 2025

I will merge this and add tests separately, thank you.

@ndyakov ndyakov merged commit c609828 into redis:master Jun 3, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants