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

STYLE: ResetNextSeed GTest should not use instance for GetNextSeed call #4290

Conversation

N-Dekker
Copy link
Contributor

@N-Dekker N-Dekker commented Nov 6, 2023

MersenneTwisterRandomVariateGenerator::GetNextSeed() is a static member function, so there is no need to call it via an instance of the generator, in the MersenneTwisterRandomVariateGenerator.ResetNextSeed unit test.

The commit also adds some documentation to the unit test.

Suggested by clang-tidy:
https://clang.llvm.org/extra/clang-tidy/checks/readability/static-accessed-through-instance.html


Obviously it was my own fault 😸 introduced with:

@github-actions github-actions bot added type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming) labels Nov 6, 2023
@N-Dekker N-Dekker force-pushed the Remove-instance-from-ResetNextSeed-GTest branch from 838e9be to d871a24 Compare November 6, 2023 21:10
@N-Dekker N-Dekker marked this pull request as ready for review November 6, 2023 21:13
`MersenneTwisterRandomVariateGenerator::GetNextSeed()` is a static member
function, so there is no need to call it via an instance of the generator,
in the `MersenneTwisterRandomVariateGenerator.ResetNextSeed` unit test.

The commit also adds documentation to the unit test.

Suggested by clang-tidy:
https://clang.llvm.org/extra/clang-tidy/checks/readability/static-accessed-through-instance.html
@N-Dekker N-Dekker force-pushed the Remove-instance-from-ResetNextSeed-GTest branch from d871a24 to c4b8e20 Compare November 7, 2023 16:09
@dzenanz dzenanz merged commit fed6ed0 into InsightSoftwareConsortium:master Nov 8, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming) type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants