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

Unified Diff: test/cctest/test-random-number-generator.cc

Issue 448603002: Refactor unit tests for the base library to use GTest. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reduce LoopIncrement test time. Created 6 years, 4 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
Index: test/cctest/test-random-number-generator.cc
diff --git a/test/cctest/test-random-number-generator.cc b/test/cctest/test-random-number-generator.cc
index ecf941062aee7f280e0667ad96eb3eb6e6bc9efa..a53205c9c8dda7a0c60ff8424ecdd8056bd3116b 100644
--- a/test/cctest/test-random-number-generator.cc
+++ b/test/cctest/test-random-number-generator.cc
@@ -40,41 +40,6 @@ static const int kRandomSeeds[] = {
};
-TEST(NextIntWithMaxValue) {
- for (unsigned n = 0; n < ARRAY_SIZE(kRandomSeeds); ++n) {
- v8::base::RandomNumberGenerator rng(kRandomSeeds[n]);
- for (int max = 1; max <= kMaxRuns; ++max) {
- int n = rng.NextInt(max);
- CHECK_LE(0, n);
- CHECK_LT(n, max);
- }
- }
-}
-
-
-TEST(NextBoolReturnsBooleanValue) {
- for (unsigned n = 0; n < ARRAY_SIZE(kRandomSeeds); ++n) {
- v8::base::RandomNumberGenerator rng(kRandomSeeds[n]);
- for (int k = 0; k < kMaxRuns; ++k) {
- bool b = rng.NextBool();
- CHECK(b == false || b == true);
- }
- }
-}
-
-
-TEST(NextDoubleRange) {
- for (unsigned n = 0; n < ARRAY_SIZE(kRandomSeeds); ++n) {
- v8::base::RandomNumberGenerator rng(kRandomSeeds[n]);
- for (int k = 0; k < kMaxRuns; ++k) {
- double d = rng.NextDouble();
- CHECK_LE(0.0, d);
- CHECK_LT(d, 1.0);
- }
- }
-}
-
-
TEST(RandomSeedFlagIsUsed) {
for (unsigned n = 0; n < ARRAY_SIZE(kRandomSeeds); ++n) {
FLAG_random_seed = kRandomSeeds[n];

Powered by Google App Engine
This is Rietveld 408576698