Home | History | Annotate | Download | only in test
      1 #include <gtest/gtest.h>
      2 
      3 #include "AllocationTestHarness.h"
      4 
      5 extern "C" {
      6 #include "osi/include/osi.h"
      7 }
      8 
      9 class RandTest : public AllocationTestHarness {};
     10 
     11 TEST_F(RandTest, test_rand) {
     12   // We can't guarantee any distribution
     13   // We'd like it to not crash though.
     14   for (int i = 0; i < 10; i++) {
     15     int x;
     16     x = osi_rand();
     17     EXPECT_TRUE(x >= 0);
     18   }
     19 }
     20