#include "absl/random/distributions.h"
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <limits>
#include <type_traits>
#include <utility>
#include <vector>
#include "gtest/gtest.h"
#include "absl/meta/type_traits.h"
#include "absl/numeric/int128.h"
#include "absl/random/internal/distribution_test_util.h"
#include "absl/random/random.h"
namespace {
constexpr int kSize = …;
class RandomDistributionsTest : public testing::Test { … };
struct Invalid { … };
template <typename A, typename B>
auto InferredUniformReturnT(int)
-> decltype(absl …);
template <typename, typename>
Invalid InferredUniformReturnT(...);
template <typename TagType, typename A, typename B>
auto InferredTaggedUniformReturnT(int)
-> decltype(absl …);
template <typename, typename, typename>
Invalid InferredTaggedUniformReturnT(...);
template <typename A, typename B, typename Expect>
void CheckArgsInferType() { … }
template <typename A, typename B, typename ExplicitRet>
auto ExplicitUniformReturnT(int) -> decltype(absl …);
template <typename, typename, typename ExplicitRet>
Invalid ExplicitUniformReturnT(...);
template <typename TagType, typename A, typename B, typename ExplicitRet>
auto ExplicitTaggedUniformReturnT(int)
-> decltype(absl …);
template <typename, typename, typename, typename ExplicitRet>
Invalid ExplicitTaggedUniformReturnT(...);
template <typename A, typename B, typename Expect>
void CheckArgsReturnExpectedType() { … }
template <typename R>
auto UniformNoBoundsReturnT(int)
-> decltype(absl …);
template <typename>
Invalid UniformNoBoundsReturnT(...);
TEST_F(RandomDistributionsTest, UniformTypeInference) { … }
TEST_F(RandomDistributionsTest, UniformExamples) { … }
TEST_F(RandomDistributionsTest, UniformNoBounds) { … }
TEST_F(RandomDistributionsTest, UniformNonsenseRanges) { … }
TEST_F(RandomDistributionsTest, UniformReal) { … }
TEST_F(RandomDistributionsTest, UniformInt) { … }
TEST_F(RandomDistributionsTest, Exponential) { … }
TEST_F(RandomDistributionsTest, PoissonDefault) { … }
TEST_F(RandomDistributionsTest, PoissonLarge) { … }
TEST_F(RandomDistributionsTest, Bernoulli) { … }
TEST_F(RandomDistributionsTest, Beta) { … }
TEST_F(RandomDistributionsTest, Zipf) { … }
TEST_F(RandomDistributionsTest, Gaussian) { … }
TEST_F(RandomDistributionsTest, LogUniform) { … }
}