summaryrefslogtreecommitdiff
path: root/system/osi/test/rand_test.cc
blob: 720617b6bf8c34bcd30d3ed79fcf37435aa8f588 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <gtest/gtest.h>

#include "AllocationTestHarness.h"

#include "osi/include/osi.h"

class RandTest : public AllocationTestHarness {};

TEST_F(RandTest, test_rand) {
  // We can't guarantee any distribution
  // We'd like it to not crash though.
  for (int i = 0; i < 10; i++) {
    int x;
    x = osi_rand();
    EXPECT_TRUE(x >= 0);
  }
}