forked from fmtlib/fmt
Simplify ceil
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806 && \
|
||||
defined(__cpp_constexpr) && __cpp_constexpr >= 201907 && \
|
||||
defined(__cpp_constexpr_dynamic_alloc) && !FMT_MSC_VERSION && \
|
||||
defined(__cpp_constexpr_dynamic_alloc) && \
|
||||
__cpp_constexpr_dynamic_alloc >= 201907 && FMT_CPLUSPLUS >= 202002L
|
||||
|
||||
template <size_t max_string_length, typename Char = char> struct test_string {
|
||||
|
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user