Simplify ceil

This commit is contained in:
Victor Zverovich
2023-05-24 11:51:34 -07:00
parent 5e988f8dfa
commit d8f04e3995
3 changed files with 4 additions and 34 deletions
-15
View File
@@ -523,18 +523,3 @@ TEST(format_impl_test, to_utf8) {
EXPECT_EQ(s, u.str());
EXPECT_EQ(s.size(), u.size());
}
TEST(format_impl_test, iceil) {
for (double v : std::initializer_list<double>{
((std::numeric_limits<int>::min)() + 0.5),
-1.2,
-0.2,
0.0,
0.2,
1.2,
4.0,
((std::numeric_limits<int>::max)() - 0.5),
}) {
EXPECT_EQ(fmt::detail::iceil(v), static_cast<int>(std::ceil(v)));
}
}