Use test_data for big objects, add big block for benchmarking#750
Merged
apoelstra merged 5 commits intorust-bitcoin:masterfrom Jan 7, 2022
Merged
Use test_data for big objects, add big block for benchmarking#750apoelstra merged 5 commits intorust-bitcoin:masterfrom
test_data for big objects, add big block for benchmarking#750apoelstra merged 5 commits intorust-bitcoin:masterfrom
Conversation
3bc4166 to
eb14443
Compare
test_data for big objects, add big block for benchmarking
Collaborator
|
Light review ack: didn't verify whether the hashes and data match but I think if they didn't it'd be caught by tests. |
Merged
eb14443 to
247a14f
Compare
Collaborator
Author
Collaborator
Author
Maybe adding too many |
Closed
sanket1729
added a commit
that referenced
this pull request
Dec 1, 2022
962abcc Add serde regression tests (Tobin Harding) Pull request description: Attempts to add regression tests for _all_ types defined in `rust-bitcoin` that implement `Serialize`/`Deserialize`. - Add a `tests` directory and implement regression tests in there - Use files for input hex and output bincode to reduce source file clutter - Copy test block and `include_bytes!` usage from RCasatta's [PR](#750) - Uses Kixunil's macro suggested below - Adds a single regression test to `util/taproot.rs` for private types ## Note to reviewers - Uses JSON for opcodes in a separate file (`tests/regression_opcodes.rs`), for all other tests uses bincode. - Bypasses the order issue for maps by only serializing maps with a single element - is this correct? Fixes #723 ACKs for top commit: apoelstra: ACK 962abcc sanket1729: ACK 962abcc. This has been open for a long time. Merging this in the interest of progress. Tree-SHA512: e34e48e1c56fab5898bc74e7fb867435ed387d828dd3daf0c7d6df8f305e1da6883e91487115ac428618eb7d95bd16aa2cd209ca219684959bc95587ef0b4083
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the first two commits I moved some data from source files to the newly introduced
test_datadir, including it withinclude_[str|bytes]!macro.The second-to-last commit introduces a big block in test_data which is very handy in ser/de benchmark (I used it for #672) because with smaller blocks you may not notice performance improvements.
Since I don't want to pollute the package the last commit excludes the
test_datadir from the published package. I think it's fine to do it because dependent packages don't run dependencies tests.