Skip to content

Commit 61d3280

Browse files
committed
Merge bitcoin/bitcoin#29907: test: Fix test/streams_tests.cpp compilation on SunOS / illumos
976e5d8 test: Fix `test/streams_tests.cpp` compilation on SunOS / illumos (Hennadii Stepanov) Pull request description: On systems where `int8_t` is defined as `char`, the `{S,Uns}erialize(Stream&, signed char)` functions become undefined. This PR 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. Fixes bitcoin/bitcoin#29884. An alternative approach is mentioned in bitcoin/bitcoin#29884 (comment) as well. ACKs for top commit: maflcko: lgtm ACK 976e5d8 theuni: ACK 976e5d8. Nice to have the serialization concept actually tested :) Tree-SHA512: 1033863e584fa8e99a281b236fa01fc919f610a024bcec792116762e28c1c16ee481bd01325c3a0ca9dd9d753176aa63bd9ac7e08a9bbce772db2949d06f6e61
2 parents bd597c3 + 976e5d8 commit 61d3280

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/streams_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ BOOST_AUTO_TEST_CASE(streams_vector_reader)
143143
BOOST_CHECK_EQUAL(reader.size(), 5U);
144144
BOOST_CHECK(!reader.empty());
145145

146-
// Read a single byte as a signed char.
147-
signed char b;
146+
// Read a single byte as a int8_t.
147+
int8_t b;
148148
reader >> b;
149149
BOOST_CHECK_EQUAL(b, -1);
150150
BOOST_CHECK_EQUAL(reader.size(), 4U);

0 commit comments

Comments
 (0)