Commit Graph

9 Commits

Author SHA1 Message Date
Tobin C. Harding a4a0f2921c
units: Add regression tests for Default impls
Add a regression test to the `api` tests to check the value returned by
`Default` for all types that implement it.
2024-12-12 15:15:29 +11:00
Tobin C. Harding ffdd63fa8e
units: test for C-SEND-SYNC
Done as part of the Rust API guidelines checklist.

Add a unit test for `Send` and one for `Sync`.
2024-12-09 10:54:07 +11:00
Fmt Bot 0990b30035 2024-12-01 automated rustfmt nightly 2024-12-01 01:41:12 +00:00
merge-script 7d8b9bd883
Merge rust-bitcoin/rust-bitcoin#3673: units: Close the hex parse errors
22769268f3 units: Close the hex parse errors (Tobin C. Harding)

Pull request description:

  As part of the 1.0 effort close the errors in the `units::parse` module.

ACKs for top commit:
  apoelstra:
    ACK 22769268f34b45c0bd86c548eb13cfe1e290f0d7; successfully ran local tests; thanks!
  sanket1729:
    ACK 22769268f3

Tree-SHA512: 598ba236f8c08c3f750112e0d8b8e0aa0568be2700a328e4a2d8999ca59eada8a16a6a1d9e9121e7f42ce9bbe3da3f87221ba67c36056996a687e489f4c6007c
2024-11-29 03:41:48 +00:00
merge-script 99bf3f74b9
Merge rust-bitcoin/rust-bitcoin#3680: units: Test C-COMMON-TRAITS
c49f40fd9a units: Test C-COMMON-TRAITS (Tobin C. Harding)

Pull request description:

  Add structs to the `api` integration test file that verify the set of common traits.

ACKs for top commit:
  apoelstra:
    ACK c49f40fd9af1b9446a7c9a35aefdc02b30801275; successfully ran local tests; good idea!

Tree-SHA512: bc60ed8912e705d4c07714e9d19c0eee4fb2eb6be17a6ee67c2bb922ea27ef3a737eda3f7de690fa3a9fa364c34029989f20361d03f706fd3152ec4f20f33aab
2024-11-28 23:27:42 +00:00
Tobin C. Harding c49f40fd9a
units: Test C-COMMON-TRAITS
Add structs to the `api` integration test file that verify the set of
common traits.
2024-11-28 16:59:00 +11:00
Tobin C. Harding 22769268f3
units: Close the hex parse errors
As part of the 1.0 effort close the errors in the `units::parse` module.
2024-11-28 13:36:09 +11:00
Tobin C. Harding 7e17eaf21c
units: Add stringy regression tests
Add regression tests for `Display` and `FromStr` impls.

Exclude error types and helper types (`amount::Display`).
2024-11-27 13:35:45 +11:00
Tobin C. Harding 7b8369f381
units: Add integration test of API surface
In an effort to check off items in the Rust API guidelines
checklist (#3632) add an integration test file that tests:

- The location of re-exports for various typical usage styles.
- Regressions in the API surface (things being accidentally moved).
- All public types implement Debug (C-DEBUG).
- For all non-error types:
    - `Debug` representation is never empty (C-DEBUG-NONEMPTY)
- For all error types:
    - Derive standard traits as defined by `rust-bitcoin` policy.

I used the `cargo check-api` script we have laying around from ages
ago (#2986) to parse `units` and get a list of the public types.
2024-11-25 13:33:15 +11:00