Conversation
|
Interesting CI failures, this PR does not touch the tests that fail. Not sure why they are failing? EDIT: Is it something to do with |
|
Nice! |
Indeed very interesting, it has to do with endianness since I see bytes are swapped every four |
|
The failure is interesting, on master: applying the following patch: now: |
|
Ok, nvm, this was me being stupid. So first we need to fix the CI to run the tests with more combinations of features, also in the cross tests. About the failing test, the bug is once again that we're relying on the internal representation of libsecp256k1's structs. which are not defined and non portable (so libsecp actually writes integers into those buffers, so they'll differ according to endianess) |
My 4 cents:
|
Add a `tests/` directory and to it add `integration.rs`. Add integration tests for sign, verify, and recover (ecdsa only) for schnorr sigs and ecdsa sigs.
ad99ae6 to
3463f93
Compare
This makes sense. Examples in rustdocs are slightly harder to maintain (mainly because my tooling doesn't work quite as nicely with them cough syntax highlighting). Unless there is some objection, I'll attempt to convert the tests I've added here into docs examples. Thanks |
|
Added an issue #375 for the bug with recovery features |
|
Closing in favour of using docs examples instead of the |
Opening draft PR as a discussion starter on the benefits of having integration tests (see note below).
Add a
tests/directory and to it addintegration.rs. Add integration tests for sign, and verify for schnorr sigs and ecdsa sigs (plus recover for ecdsa).Note: I'm not sure these tests add a lot of value, and they introduce some maintenance burden. Most of this stuff is already tested in example files and example docs code. Do we want integration tests? Is there a better way to go about this? Are these really even integration tests since each test only tests a single module?