mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
test: Fix test/streams_tests.cpp compilation on SunOS / illumos
On systems where `int8_t` is defined as `char`, the
`{S,Uns}erialize(Stream&, signed char)` functions become undefined.
This change resolves the issue by testing
`{S,Uns}erialize(Stream&, int8_t)` instead.
No behavior change on systems where `int8_t` is defined as
`signed char`, which is the case for most other systems.
This commit is contained in:
@@ -143,8 +143,8 @@ BOOST_AUTO_TEST_CASE(streams_vector_reader)
|
||||
BOOST_CHECK_EQUAL(reader.size(), 5U);
|
||||
BOOST_CHECK(!reader.empty());
|
||||
|
||||
// Read a single byte as a signed char.
|
||||
signed char b;
|
||||
// Read a single byte as a int8_t.
|
||||
int8_t b;
|
||||
reader >> b;
|
||||
BOOST_CHECK_EQUAL(b, -1);
|
||||
BOOST_CHECK_EQUAL(reader.size(), 4U);
|
||||
|
||||
Reference in New Issue
Block a user