Finschia / ostracon

Ostracon, a consensus algorithm, is forked from Tendermint Core. We have added VRF to Tendermint BFT. It adds randomness to PoS Validator elections and improves security.
Apache License 2.0
69 stars 28 forks source link

Add a test for `func nextRandom(rand *uint64) uint64` #605

Closed Kynea0b closed 1 year ago

Kynea0b commented 1 year ago

Description

func nextRandom(rand *uint64) uint64 is a function defined locally. So, add a test just in case. This test guarantees the following for this local function:

The expected output is the same as that of general splitMix64().

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 1 year ago

Codecov Report

Merging #605 (80e43e4) into main (0d8a0fd) will decrease coverage by 0.03%. The diff coverage is n/a.

:exclamation: Current head 80e43e4 differs from pull request most recent head 4f6f449. Consider uploading reports for the commit 4f6f449 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #605 +/- ## ========================================== - Coverage 66.21% 66.19% -0.03% ========================================== Files 277 277 Lines 36969 36969 ========================================== - Hits 24478 24470 -8 - Misses 10725 10730 +5 - Partials 1766 1769 +3 ``` [see 11 files with indirect coverage changes](https://app.codecov.io/gh/Finschia/ostracon/pull/605/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)