mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-08 03:59:18 +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:
parent
c05c214f2e
commit
976e5d8f7b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user