Skip to content

Commit 405130a

Browse files
committed
Improve 1384 test case
1 parent f994f3a commit 405130a

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

test/github_issue_1384.cpp

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111
namespace boost {
1212
namespace log {
1313

14-
auto do_something() -> void
15-
{
16-
}
14+
auto do_something() -> void;
15+
16+
// The presence of this namespace-local subroutine itself conflicted
17+
// (at the time of the issue) with Boost.Log. So this behavior is
18+
// simulated here.
19+
20+
auto do_something() -> void { } // LCOV_EXCL_LINE
1721

1822
} // namespace log
1923
} // namespace boost
@@ -24,15 +28,24 @@ auto main() -> int;
2428

2529
auto main() -> int
2630
{
31+
boost::log::do_something(); // LCOV_EXCL_LINE
32+
2733
using local_decimal_type = boost::decimal::decimal64_t;
2834

29-
const local_decimal_type arg_dec { 1.23456 };
35+
const local_decimal_type arg_dec { 123456, -5 };
3036

37+
// N[ArcCosh[123456/100000], 20]
3138
const local_decimal_type result1 { acosh(arg_dec) };
39+
40+
// N[Log[Gamma[123456/100000]], 20]
3241
const local_decimal_type result2 { lgamma(arg_dec) };
3342

34-
BOOST_TEST(result1 > local_decimal_type { 0.0 });
35-
BOOST_TEST(result2 < local_decimal_type { 0.0 });
43+
// N[Zeta[123456/10000], 20]
44+
const local_decimal_type result3 { riemann_zeta(arg_dec * local_decimal_type { 10.0 }) };
45+
46+
BOOST_TEST(result1 > local_decimal_type { 0.0 }); // 0.67219624862864254285
47+
BOOST_TEST(result2 < local_decimal_type { 0.0 }); // -0.094616414889227312801
48+
BOOST_TEST(result3 > local_decimal_type { 1.0 }); // 1.0001934607133929720
3649

3750
return boost::report_errors();
3851
}

0 commit comments

Comments
 (0)