Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abseil-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
abseil-cpp
Commits
f7a250aa
Commit
f7a250aa
authored
May 12, 2022
by
Abseil Team
Committed by
Copybara-Service
May 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Internal change
PiperOrigin-RevId: 448361090 Change-Id: Iec6063b88a778dfe815081612650eaa456503265
parent
3af16ffe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
absl/random/beta_distribution_test.cc
+19
-9
No files found.
absl/random/beta_distribution_test.cc
View file @
f7a250aa
...
@@ -45,15 +45,25 @@ namespace {
...
@@ -45,15 +45,25 @@ namespace {
template
<
typename
IntType
>
template
<
typename
IntType
>
class
BetaDistributionInterfaceTest
:
public
::
testing
::
Test
{};
class
BetaDistributionInterfaceTest
:
public
::
testing
::
Test
{};
// double-double arithmetic is not supported well by either GCC or Clang; see
constexpr
bool
ShouldExerciseLongDoubleTests
()
{
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048,
// long double arithmetic is not supported well by either GCC or Clang on
// https://bugs.llvm.org/show_bug.cgi?id=49131, and
// most platforms specifically not when implemented in terms of double-double;
// https://bugs.llvm.org/show_bug.cgi?id=49132. Don't bother running these tests
// see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048,
// with double doubles until compiler support is better.
// https://bugs.llvm.org/show_bug.cgi?id=49131, and
using
RealTypes
=
// https://bugs.llvm.org/show_bug.cgi?id=49132.
std
::
conditional
<
absl
::
numeric_internal
::
IsDoubleDouble
(),
// So a conservative choice here is to disable long-double tests pretty much
::
testing
::
Types
<
float
,
double
>
,
// everywhere except on x64 but only if long double is not implemented as
::
testing
::
Types
<
float
,
double
,
long
double
>>::
type
;
// double-double.
#if defined(__i686__) && defined(__x86_64__)
return
!
absl
::
numeric_internal
::
IsDoubleDouble
();
#else
return
false
;
#endif
}
using
RealTypes
=
std
::
conditional
<
ShouldExerciseLongDoubleTests
(),
::
testing
::
Types
<
float
,
double
,
long
double
>
,
::
testing
::
Types
<
float
,
double
>>::
type
;
TYPED_TEST_SUITE
(
BetaDistributionInterfaceTest
,
RealTypes
);
TYPED_TEST_SUITE
(
BetaDistributionInterfaceTest
,
RealTypes
);
TYPED_TEST
(
BetaDistributionInterfaceTest
,
SerializeTest
)
{
TYPED_TEST
(
BetaDistributionInterfaceTest
,
SerializeTest
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment