Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(844)

Unified Diff: unit_test/math_test.cc

Issue 1361813002: replace random with fastrand (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: remove win32 version of random Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « unit_test/convert_test.cc ('k') | unit_test/planar_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unit_test/math_test.cc
diff --git a/unit_test/math_test.cc b/unit_test/math_test.cc
index 23ff140a712044e31f665976fc1f6309d362b2a6..45c3297628254bd7cb94a1f962dcdb033737464e 100644
--- a/unit_test/math_test.cc
+++ b/unit_test/math_test.cc
@@ -66,7 +66,6 @@ TEST_F(libyuvTest, TestFixedDiv) {
}
EXPECT_EQ(123 * 65536, libyuv::FixedDiv(123, 1));
- srandom(time(NULL));
MemRandomize(reinterpret_cast<uint8*>(&num[0]), sizeof(num));
MemRandomize(reinterpret_cast<uint8*>(&div[0]), sizeof(div));
for (int j = 0; j < 1280; ++j) {
@@ -92,7 +91,6 @@ TEST_F(libyuvTest, TestFixedDiv_Opt) {
int result_opt[1280];
int result_c[1280];
- srandom(time(NULL));
MemRandomize(reinterpret_cast<uint8*>(&num[0]), sizeof(num));
MemRandomize(reinterpret_cast<uint8*>(&div[0]), sizeof(div));
for (int j = 0; j < 1280; ++j) {
@@ -127,7 +125,6 @@ TEST_F(libyuvTest, TestFixedDiv1_Opt) {
int result_opt[1280];
int result_c[1280];
- srandom(time(NULL));
MemRandomize(reinterpret_cast<uint8*>(&num[0]), sizeof(num));
MemRandomize(reinterpret_cast<uint8*>(&div[0]), sizeof(div));
for (int j = 0; j < 1280; ++j) {
« no previous file with comments | « unit_test/convert_test.cc ('k') | unit_test/planar_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698