This allows for much more in depth testing, even for destination we don't have support for.
Details
Details
Added a bunch of unittests.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Mostly nits, except for CashAddressContent::type which must be initialized.
src/cashaddrenc.cpp | ||
---|---|---|
89 ↗ | (On Diff #1680) | CashAddressContent::type is unitialized. You could add a constructor to CashAddressContent. Also, just return { }? |
src/cashaddrenc.h | ||
16 ↗ | (On Diff #1680) | Suggest calling this CashAddrContent for consistency |
src/test/cashaddrenc_tests.cpp | ||
181 ↗ | (On Diff #1680) | How about a comment about what pair contains? |
189 ↗ | (On Diff #1680) | Suggest naming the magic number 12. For example declare variable const size_t prefixLen = params.CashAddrPrefix() + 1 outside loop |
src/cashaddrenc.cpp | ||
---|---|---|
89 ↗ | (On Diff #1680) | It is initialized. If the number of element of the initializer list is less than the number of element in the aggregate, the extra element are value-initializer , which means zeroed for PODs and default constructed for non POD. |
src/test/cashaddrenc_tests.cpp | ||
189 ↗ | (On Diff #1680) | It is 8 for the version + 4 in order to get the right rounding for the division. |