aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/random/random_test.cc
blob: 7284d5adc7f7f87ada0d62a8704dcb8fc2d97ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "tensorflow/core/lib/random/random.h"

#include <set>
#include <gtest/gtest.h>
#include "tensorflow/core/platform/port.h"

namespace tensorflow {
namespace random {
namespace {

TEST(New64Test, SanityCheck) {
  std::set<uint64> values;
  for (int i = 0; i < 1000000; i++) {
    uint64 x = New64();
    EXPECT_TRUE(values.insert(x).second) << "duplicate " << x;
  }
}

}  // namespace
}  // namespace random
}  // namespace tensorflow