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 10, 2024
1 parent 13f77c2 commit beb7858
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 beb7858

Please sign in to comment.