Skip to content

Commit ba749cf

Browse files
authored
Merge pull request #1223 from cppalliance/testing_faciliites
2 parents c549ec3 + 5ffac74 commit ba749cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+92
-145
lines changed

include/boost/decimal/decimal128_t.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,6 @@ BOOST_DECIMAL_EXPORT class decimal128_t final
530530
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integer, std::partial_ordering);
531531
#endif
532532

533-
#if !defined(BOOST_DECIMAL_DISABLE_IOSTREAM)
534-
friend inline std::string bit_string(decimal128_t rhs) noexcept;
535-
#endif
536-
537533
// 3.6.4 Same Quantum
538534
friend constexpr auto samequantumd128(const decimal128_t& lhs, const decimal128_t& rhs) noexcept -> bool;
539535

@@ -606,15 +602,6 @@ BOOST_DECIMAL_EXPORT class decimal128_t final
606602
friend constexpr auto fmad128(decimal128_t x, decimal128_t y, decimal128_t z) noexcept -> decimal128_t;
607603
};
608604

609-
#if !defined(BOOST_DECIMAL_DISABLE_IOSTREAM)
610-
inline std::string bit_string(decimal128_t rhs) noexcept
611-
{
612-
std::stringstream ss;
613-
ss << std::hex << rhs.bits_.high << rhs.bits_.low;
614-
return ss.str();
615-
}
616-
#endif
617-
618605
#ifdef BOOST_DECIMAL_HAS_INT128
619606

620607
constexpr auto from_bits(const detail::builtin_uint128_t rhs) noexcept -> decimal128_t

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);

include/boost/decimal/detail/config.hpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -272,26 +272,6 @@ typedef unsigned __int128 builtin_uint128_t;
272272
# define BOOST_DECIMAL_NO_CONSTEVAL_DETECTION
273273
#endif
274274

275-
#if defined(__clang__)
276-
# if defined __has_feature
277-
# if __has_feature(thread_sanitizer) || __has_feature(address_sanitizer) || __has_feature(thread_sanitizer)
278-
# define BOOST_DECIMAL_REDUCE_TEST_DEPTH
279-
# endif
280-
# endif
281-
#elif defined(__GNUC__)
282-
# if defined(__SANITIZE_THREAD__) || defined(__SANITIZE_ADDRESS__) || defined(__SANITIZE_THREAD__)
283-
# define BOOST_DECIMAL_REDUCE_TEST_DEPTH
284-
# endif
285-
#elif defined(_MSC_VER)
286-
# if defined(_DEBUG) || defined(__SANITIZE_ADDRESS__)
287-
# define BOOST_DECIMAL_REDUCE_TEST_DEPTH
288-
# endif
289-
#endif
290-
291-
#if !defined(BOOST_DECIMAL_REDUCE_TEST_DEPTH) && ((defined(UBSAN) && (UBSAN == 1)))
292-
# define BOOST_DECIMAL_REDUCE_TEST_DEPTH
293-
#endif
294-
295275
#if defined(__clang__) && __clang_major__ < 19
296276
# define BOOST_DECIMAL_CLANG_STATIC static
297277
#else

test/compare_dec128_and_fast.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
#include "testing_config.hpp"
56
#include <boost/decimal.hpp>
67
#include <random>
78
#include <limits>

test/random_decimal128_comp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
#include "testing_config.hpp"
56
#include <boost/decimal.hpp>
67
#include <boost/core/lightweight_test.hpp>
78
#include <random>

test/random_decimal128_fast_comp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
#include "testing_config.hpp"
56
#include <boost/decimal.hpp>
67
#include <boost/core/lightweight_test.hpp>
78
#include <random>

test/random_decimal128_fast_math.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
#include "testing_config.hpp"
56
#include <boost/decimal.hpp>
67
#include <random>
78
#include <limits>

test/random_decimal128_math.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
#include "testing_config.hpp"
56
#include <boost/decimal.hpp>
67
#include <random>
78
#include <limits>

test/random_decimal32_comp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <boost/decimal.hpp>
77
#endif
88

9+
#include "testing_config.hpp"
910
#include <boost/core/lightweight_test.hpp>
1011
#include <iostream>
1112
#include <random>

test/random_decimal32_fast_comp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <boost/decimal.hpp>
77
#endif
88

9+
#include "testing_config.hpp"
910
#include <boost/core/lightweight_test.hpp>
1011
#include <iostream>
1112
#include <random>

0 commit comments

Comments
 (0)