Page MenuHomePhabricator

[tests] fix cross-platform sprintf issue in blockindex_tests
ClosedPublic

Authored by schancel on Nov 2 2018, 20:44.

Details

Summary

As per title. Tinyformat does not print the same on every platform w/r/t pointers.
It does not seem follow the libc specification on Darwin. This patch fixes the issue
by using %p in both the test, and the ToString() method.

Additionally, use BOOST_CHECK_EQUAL so proper failure strings are printed in
the future.

Test Plan
make VERBOSE=1 check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix-blockindex-tests
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3750
Build 5575: Bitcoin ABC Buildbot (legacy)
Build 5574: arc lint + arc unit