diff options
author | Elliott Hughes <enh@google.com> | 2014-07-14 11:57:03 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-14 12:02:22 -0700 |
commit | 76c241b091b4d9d9a9237d40e814e52ce2917f47 (patch) | |
tree | fb7139355285a3b9efcabd6009b8f2d36024a9fe /tests/stdlib_test.cpp | |
parent | 83ce99d8b7e2b15b2169e6e6e18e871ad35abb6c (diff) |
Implement rand/srand in terms of random/srandom.
Code developed for glibc or older versions of bionic might expect more
randomness than the BSD implementation provides.
Bug: 15829381
Change-Id: Ia5a908a816e0a5f0639f514107a6384a51ec157e
Diffstat (limited to 'tests/stdlib_test.cpp')
-rw-r--r-- | tests/stdlib_test.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp index 7c86d76ba..6d29421d0 100644 --- a/tests/stdlib_test.cpp +++ b/tests/stdlib_test.cpp @@ -53,17 +53,10 @@ TEST(stdlib, random) { TEST(stdlib, rand) { srand(0x01020304); -#if defined(__BIONIC__) - EXPECT_EQ(1675538669, rand()); - EXPECT_EQ(1678228258, rand()); - EXPECT_EQ(1352350131, rand()); - EXPECT_EQ(824068976, rand()); -#else EXPECT_EQ(55436735, rand()); EXPECT_EQ(1399865117, rand()); EXPECT_EQ(2032643283, rand()); EXPECT_EQ(571329216, rand()); -#endif } TEST(stdlib, mrand48) { |