Skip to content

Commit

Permalink
test/ranges-test.cc: changed type of integer literals to unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwuehrer committed Aug 14, 2020
1 parent be054e5 commit e70250f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/ranges-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,17 @@ template <typename T> class non_const_only_range {
};

TEST(RangesTest, JoinRange) {
non_const_only_range<int> x(3, 0);
non_const_only_range<int> x(3u, 0);
EXPECT_EQ("0,0,0", fmt::format("{}", fmt::join(x, ",")));
EXPECT_EQ("0,0,0",
fmt::format("{}", fmt::join(non_const_only_range<int>(3, 0), ",")));
EXPECT_EQ(
"0,0,0",
fmt::format("{}", fmt::join(non_const_only_range<int>(3u, 0), ",")));

std::vector<int> y(3, 0);
std::vector<int> y(3u, 0);
EXPECT_EQ("0,0,0", fmt::format("{}", fmt::join(y, ",")));
EXPECT_EQ("0,0,0", fmt::format("{}", fmt::join(std::vector<int>(3, 0), ",")));
EXPECT_EQ("0,0,0",
fmt::format("{}", fmt::join(std::vector<int>(3u, 0), ",")));

const std::vector<int> z(3, 0);
const std::vector<int> z(3u, 0);
EXPECT_EQ("0,0,0", fmt::format("{}", fmt::join(z, ",")));
}

0 comments on commit e70250f

Please sign in to comment.