Skip to content

Add arbitraries #24

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 2 commits into from
Mar 9, 2020
Merged

Add arbitraries #24

merged 2 commits into from
Mar 9, 2020

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Feb 20, 2020

Add arbitraries for Cid, Prefix and Codec

  • the Codec arb prefers more popular codecs

@rklaehn rklaehn force-pushed the actyx/arbs branch 3 times, most recently from fa62c2f to bcac173 Compare March 3, 2020 12:58
@dvc94ch dvc94ch mentioned this pull request Mar 6, 2020
@vmx
Copy link
Member

vmx commented Mar 6, 2020

I've released rust-multihash 10.1 which includes the arbitraries.

...and adapt to the new API
@rklaehn
Copy link
Contributor Author

rklaehn commented Mar 9, 2020

@vmx I am using the official multihash 0.10.1 now and am using the new API. So as far as I can see this is good to go. Not sure why the coverage test fails. Seems to be some CI config issue.

@rklaehn rklaehn mentioned this pull request Mar 9, 2020
Copy link
Member

@vmx vmx left a comment

Choose a reason for hiding this comment

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

Thanks for the rebase! The CI failure was indeed a CI issue (fixed on master).

let hash: Multihash = if !v0 {
Arbitrary::arbitrary(g)
} else {
if v0 {
Copy link
Member

Choose a reason for hiding this comment

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

(nitpick, no need to change it) Due to the API changes, this could be written as if version == Version::V0 {

@vmx vmx merged commit f220c06 into multiformats:master Mar 9, 2020
@vmx vmx mentioned this pull request Mar 9, 2020
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.

2 participants