Skip to content

Commit b3cd503

Browse files
committed
Remove debug pattern function
1 parent 806252b commit b3cd503

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

include/boost/decimal/decimal32_t.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ BOOST_DECIMAL_EXPORT class decimal32_t final // NOLINT(cppcoreguidelines-special
170170
// Debug bit pattern
171171
friend constexpr auto from_bits(std::uint32_t bits) noexcept -> decimal32_t;
172172
friend BOOST_DECIMAL_CXX20_CONSTEXPR auto to_bits(decimal32_t rhs) noexcept -> std::uint32_t;
173-
friend inline auto debug_pattern(decimal32_t rhs) noexcept -> void;
174173

175174
// Equality template between any integer type and decimal32_t
176175
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE Decimal, BOOST_DECIMAL_INTEGRAL Integer>
@@ -2037,19 +2036,6 @@ constexpr auto decimal32_t::operator%=(const decimal32_t rhs) noexcept -> decima
20372036
return *this;
20382037
}
20392038

2040-
// LCOV_EXCL_START
2041-
inline auto debug_pattern(const decimal32_t rhs) noexcept -> void
2042-
{
2043-
#if !defined(BOOST_DECIMAL_DISABLE_IOSTREAM)
2044-
std::cerr << "Sig: " << rhs.full_significand()
2045-
<< "\nExp: " << rhs.biased_exponent()
2046-
<< "\nNeg: " << rhs.isneg() << std::endl;
2047-
#else
2048-
static_cast<void>(rhs);
2049-
#endif
2050-
}
2051-
// LCOV_EXCL_STOP
2052-
20532039
BOOST_DECIMAL_CXX20_CONSTEXPR decimal32_t::operator float() const noexcept
20542040
{
20552041
return to_float<decimal32_t, float>(*this);

test/test_decimal32.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -417,31 +417,6 @@ void test_construct_from_integer()
417417
}
418418
}
419419

420-
template <typename T>
421-
void test_construct_from_float()
422-
{
423-
constexpr decimal32_t one(1, 0);
424-
decimal32_t float_one(T(1));
425-
if(!BOOST_TEST_EQ(one, float_one))
426-
{
427-
debug_pattern(float_one); // LCOV_EXCL_LINE
428-
}
429-
430-
constexpr decimal32_t fraction(12345, -4);
431-
decimal32_t float_frac(T(1.2345));
432-
if(!BOOST_TEST_EQ(fraction, float_frac))
433-
{
434-
debug_pattern(float_frac); // LCOV_EXCL_LINE
435-
}
436-
437-
constexpr decimal32_t neg_frac(98123, -4, true);
438-
decimal32_t neg_float_frac(T(-9.8123));
439-
if(!BOOST_TEST_EQ(neg_frac, neg_float_frac))
440-
{
441-
debug_pattern(neg_float_frac); // LCOV_EXCL_LINE
442-
}
443-
}
444-
445420
template <typename T>
446421
void spot_check_addition(T a, T b, T res)
447422
{
@@ -491,16 +466,6 @@ int main()
491466
test_construct_from_integer<long>();
492467
test_construct_from_integer<long long>();
493468

494-
test_construct_from_float<float>();
495-
test_construct_from_float<double>();
496-
497-
#if BOOST_DECIMAL_LDBL_BITS != 128
498-
test_construct_from_float<long double>();
499-
#endif
500-
#ifdef BOOST_DECIMAL_HAS_FLOAT128
501-
//test_construct_from_float<__float128>();
502-
#endif
503-
504469
test_comp();
505470

506471
test_addition();

0 commit comments

Comments
 (0)