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

CSUB-347: Follow up on tests #878

Merged
merged 3 commits into from
Jan 11, 2023
Merged

Conversation

atodorov
Copy link
Collaborator

@atodorov atodorov commented Jan 6, 2023

Description of proposed changes:

Practical tips for PR review & merge:

  • All GitHub Actions report PASS
  • Newly added code/functions have unit tests
    • Coverage tools report all newly added lines as covered
    • The positive scenario is exercised
    • Negative scenarios are exercised, e.g. assert on all possible errors
    • Assert on events triggered if applicable
    • Assert on changes made to storage if applicable
  • Modified behavior/functions - try to make sure above test items are covered
  • Integration tests are added if applicable/needed

@atodorov atodorov force-pushed the tests/CSUB-347-follow-up-on-tests branch from bcd3390 to 57aafe3 Compare January 6, 2023 20:34
Copy link
Collaborator Author

@atodorov atodorov left a comment

Choose a reason for hiding this comment

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

@CAGS295 for sortition::threshold() can you explain to me what the expected behavior should be so that we can encode it via property based test(s) ?

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

For full LLVM coverage report click here!

@CAGS295
Copy link
Contributor

CAGS295 commented Jan 7, 2023

Same properties as model. Threshold is a model analogous with u128 as output instead of a floating point [0,1]. threshold is model(..).mul(u128::MAX) so the output is within [0,u128::MAX]. I'm curious what is the precision error when you try to

let {n,d} = bigrational::from(f64::epsilon);
x = model(..);
x / d * n

The question is, what is the geometric difference between the true value and actual output. and if f64::epsilon is an achievable output from model in the first place.
Another interesting test would be bigrational::from(1 - f64::epsilon)

CAGS295
CAGS295 previously approved these changes Jan 7, 2023
@atodorov atodorov force-pushed the tests/CSUB-347-follow-up-on-tests branch 3 times, most recently from de07866 to 70f9f44 Compare January 9, 2023 16:03
CAGS295
CAGS295 previously approved these changes Jan 10, 2023
@atodorov atodorov merged commit af5da66 into dev Jan 11, 2023
@atodorov atodorov deleted the tests/CSUB-347-follow-up-on-tests branch January 11, 2023 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants