upload android base code part6
This commit is contained in:
parent
421e214c7d
commit
4e516ec6ed
35396 changed files with 9188716 additions and 0 deletions
17
android/system/bt/osi/test/rand_test.cc
Normal file
17
android/system/bt/osi/test/rand_test.cc
Normal file
|
@ -0,0 +1,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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue