HomePhabricator

[tests] fix cross-platform sprintf issue in blockindex_tests

Description

[tests] fix cross-platform sprintf issue in blockindex_tests

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1997

Details

Provenance
schancelAuthored on Nov 2 2018, 20:40
schancelPushed on Nov 2 2018, 20:56
Reviewer
Restricted Project
Differential Revision
D1997: [tests] fix cross-platform sprintf issue in blockindex_tests
Parents
rABC79f535c05661: Updated osx and unix build docs to include out-of-tree build recommendations…
Branches
Unknown
Tags
Unknown