Skip to content

Commit

Permalink
Reverted std::array<signed char back to std::array<int8_t
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Jan 5, 2025
1 parent 7e2aeb9 commit ef6f878
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/test_bit_stream_reader_big_endian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ namespace
TEST(test_read_int8_t)
{
std::array<char, 4U> storage = { char(0x01), char(0x5A), char(0xA5), char(0xFF) };
std::array<signed char, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };

etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);

Expand Down Expand Up @@ -246,7 +246,7 @@ namespace
TEST(test_read_checked_int8_t_using_non_member_function)
{
std::array<char, 4U> storage = { char(0x01), char(0x5A), char(0xA5), char(0xFF) };
std::array<signed char, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };

etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);

Expand Down Expand Up @@ -282,7 +282,7 @@ namespace
TEST(test_read_unchecked_int8_t_using_non_member_function)
{
std::array<char, 4U> storage = { char(0x01), char(0x5A), char(0xA5), char(0xFF) };
std::array<signed char, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };

etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);

Expand All @@ -307,7 +307,7 @@ namespace
TEST(test_read_int8_t_5bits)
{
std::array<char, 3U> storage = { char(0x0E), char(0x8B), char(0xF0) };
std::array<signed char, 4U> expected = { int8_t(0x01), int8_t(0xFA), int8_t(0x05), int8_t(0xFF) };
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0xFA), int8_t(0x05), int8_t(0xFF) };

etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::big);

Expand Down
2 changes: 1 addition & 1 deletion test/test_bit_stream_reader_little_endian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ namespace
TEST(test_read_int8_t)
{
std::array<char, 4U> storage = { char(0x80), char(0x5A), char(0xA5), char(0xFF) };
std::array<signed char, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };
std::array<int8_t, 4U> expected = { int8_t(0x01), int8_t(0x5A), int8_t(0xA5), int8_t(0xFF) };

etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::endian::little);

Expand Down

0 comments on commit ef6f878

Please sign in to comment.