Revision: 18817
Author:   [email protected]
Date:     Fri Jan 24 11:58:11 2014 UTC
Log:      Use rand not random

Should make VS happier.

[email protected]
BUG=

Review URL: https://codereview.chromium.org/145173012
http://code.google.com/p/v8/source/detail?r=18817

Modified:
 /branches/bleeding_edge/test/cctest/test-types.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-types.cc Fri Jan 24 11:47:47 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-types.cc Fri Jan 24 11:58:11 2014 UTC
@@ -125,14 +125,14 @@
   }

   TypeHandle Fuzz(int depth = 5) {
-    switch (random() % (depth == 0 ? 3 : 20)) {
+    switch (rand() % (depth == 0 ? 3 : 20)) {
       case 0: {  // bitset
         int n = 0
         #define COUNT_BITSET_TYPES(type, value) + 1
         BITSET_TYPE_LIST(COUNT_BITSET_TYPES)
         #undef COUNT_BITSET_TYPES
         ;
-        int i = random() % n;
+        int i = rand() % n;
         #define PICK_BITSET_TYPE(type, value) \
           if (i-- == 0) return Type::type(region_);
         BITSET_TYPE_LIST(PICK_BITSET_TYPE)
@@ -140,13 +140,13 @@
         UNREACHABLE();
       }
       case 1:  // class
-        switch (random() % 2) {
+        switch (rand() % 2) {
           case 0: return ObjectClass;
           case 1: return ArrayClass;
         }
         UNREACHABLE();
       case 2:  // constant
-        switch (random() % 6) {
+        switch (rand() % 6) {
           case 0: return SmiConstant;
           case 1: return Signed32Constant;
           case 2: return ObjectConstant1;
@@ -156,7 +156,7 @@
         }
         UNREACHABLE();
       default: {  // union
-        int n = random() % 10;
+        int n = rand() % 10;
         TypeHandle type = None;
         for (int i = 0; i < n; ++i) {
           type = Type::Union(type, Fuzz(depth - 1), region_);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to