hpx icon indicating copy to clipboard operation
hpx copied to clipboard

modified existing extrema algo tests

Open sleepingeight opened this issue 6 months ago • 3 comments

Fixes #6627

Proposed Changes

  • Added a new test utility random_repeat to generate vectors having repeated values.
  • This utility is used to test the extrema algorithms, and I've verified that the existing implementations work properly.

Any background context you want to provide?

Used uniform_int_distribution to generate random numbers. Tests for container_algorithms can also be modified, but the tests need to be modified to not use sentinel (as we have duplicate values in our vector). I can update the tests if usage of sentinel can be removed in these tests.

Checklist

Not all points below apply to all pull requests.

  • [ ] I have added a new feature and have added tests to go along with it.
  • [ ] I have fixed a bug and have added a regression test.
  • [x] I have added a test using random numbers; I have made sure it uses a seed, and that random numbers generated are valid inputs for the tests.

sleepingeight avatar Jun 22 '25 09:06 sleepingeight

Can one of the admins verify this patch?

StellarBot avatar Jun 22 '25 10:06 StellarBot

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for dcf267d7868a0deab2e6f746ca5be8dad6553eea[^1] :white_check_mark:
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (dcf267d7868a0deab2e6f746ca5be8dad6553eea) Report Missing Report Missing Report Missing
Head commit (c88e3ec67bc1b4c97c3451149f9a1dbeadb65d46) 193847 165033 85.14%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6724) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

[^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

codacy-production[bot] avatar Jun 22 '25 14:06 codacy-production[bot]

  • This utility is used to test the extrema algorithms, and I've verified that the existing implementations work properly.

I wouldn't like removing the tests realted to sentinels.

hkaiser avatar Jun 24 '25 01:06 hkaiser