mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-05 05:02:06 +02: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_EQUAL(reader.size(), 5U);
|
||||||
BOOST_CHECK(!reader.empty());
|
BOOST_CHECK(!reader.empty());
|
||||||
|
|
||||||
// Read a single byte as a signed char.
|
// Read a single byte as a int8_t.
|
||||||
signed char b;
|
int8_t b;
|
||||||
reader >> b;
|
reader >> b;
|
||||||
BOOST_CHECK_EQUAL(b, -1);
|
BOOST_CHECK_EQUAL(b, -1);
|
||||||
BOOST_CHECK_EQUAL(reader.size(), 4U);
|
BOOST_CHECK_EQUAL(reader.size(), 4U);
|
||||||
|
Reference in New Issue
Block a user