Skip to content

Commit

Permalink
Use explicit size in test when reading integers.
Browse files Browse the repository at this point in the history
On Windows `long` is 32bits. It's better to use an explicit size.
  • Loading branch information
mgautierfr committed Jun 17, 2024
1 parent f92d1e6 commit eeb84c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/istreamreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ TEST(IStreamReader, read_zero)
{
InfiniteZeroStream izs;
IStreamReader& ids = izs;
EXPECT_EQ(0, ids.read<int>());
EXPECT_EQ(0L, ids.read<long>());
EXPECT_EQ(0, ids.read<uint32_t>());
EXPECT_EQ(0L, ids.read<uint64_t>());

// zim::fromLittleEndian() handles only integer types
// EXPECT_EQ(0.0, ids.read<double>());
Expand All @@ -78,8 +78,8 @@ TEST(IStreamReader, read_increasing)
{
InfiniteIncreasingStream iis;
IStreamReader& ids = iis;
EXPECT_EQ(0x03020100, ids.read<int>());
EXPECT_EQ(0x0B0A090807060504, ids.read<long>());
EXPECT_EQ(0x03020100, ids.read<uint32_t>());
EXPECT_EQ(0x0B0A090807060504, ids.read<uint64_t>());

// zim::fromLittleEndian() handles only integer types
// EXPECT_EQ(0.0, ids.read<double>());
Expand Down

0 comments on commit eeb84c4

Please sign in to comment.