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:
Hennadii Stepanov 2024-04-18 10:53:32 +01:00
parent c05c214f2e
commit 976e5d8f7b
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -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);