| OLD | NEW | 
|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 65   CHECK_EQ(1000000, FastD2IChecked(1000000.0)); | 65   CHECK_EQ(1000000, FastD2IChecked(1000000.0)); | 
| 66 | 66 | 
| 67   CHECK_EQ(-1000000, FastD2IChecked(-1000000.123)); | 67   CHECK_EQ(-1000000, FastD2IChecked(-1000000.123)); | 
| 68   CHECK_EQ(-1, FastD2IChecked(-1.234)); | 68   CHECK_EQ(-1, FastD2IChecked(-1.234)); | 
| 69   CHECK_EQ(0, FastD2IChecked(0.345)); | 69   CHECK_EQ(0, FastD2IChecked(0.345)); | 
| 70   CHECK_EQ(1, FastD2IChecked(1.234)); | 70   CHECK_EQ(1, FastD2IChecked(1.234)); | 
| 71   CHECK_EQ(1000000, FastD2IChecked(1000000.123)); | 71   CHECK_EQ(1000000, FastD2IChecked(1000000.123)); | 
| 72 | 72 | 
| 73   CHECK_EQ(INT_MAX, FastD2IChecked(1.0e100)); | 73   CHECK_EQ(INT_MAX, FastD2IChecked(1.0e100)); | 
| 74   CHECK_EQ(INT_MIN, FastD2IChecked(-1.0e100)); | 74   CHECK_EQ(INT_MIN, FastD2IChecked(-1.0e100)); | 
| 75   CHECK_EQ(INT_MIN, FastD2IChecked(v8::base::OS::nan_value())); | 75   CHECK_EQ(INT_MIN, FastD2IChecked(std::numeric_limits<double>::quiet_NaN())); | 
| 76 } | 76 } | 
| 77 | 77 | 
| 78 | 78 | 
| 79 TEST(BitSetComputer) { | 79 TEST(BitSetComputer) { | 
| 80   typedef BitSetComputer<bool, 1, kSmiValueSize, uint32_t> BoolComputer; | 80   typedef BitSetComputer<bool, 1, kSmiValueSize, uint32_t> BoolComputer; | 
| 81   CHECK_EQ(0, BoolComputer::word_count(0)); | 81   CHECK_EQ(0, BoolComputer::word_count(0)); | 
| 82   CHECK_EQ(1, BoolComputer::word_count(8)); | 82   CHECK_EQ(1, BoolComputer::word_count(8)); | 
| 83   CHECK_EQ(2, BoolComputer::word_count(50)); | 83   CHECK_EQ(2, BoolComputer::word_count(50)); | 
| 84   CHECK_EQ(0, BoolComputer::index(0, 8)); | 84   CHECK_EQ(0, BoolComputer::index(0, 8)); | 
| 85   CHECK_EQ(100, BoolComputer::index(100, 8)); | 85   CHECK_EQ(100, BoolComputer::index(100, 8)); | 
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 288   vec.push_back(66); | 288   vec.push_back(66); | 
| 289   for (auto& i : vec) { | 289   for (auto& i : vec) { | 
| 290     ++i; | 290     ++i; | 
| 291   } | 291   } | 
| 292   int j = 12; | 292   int j = 12; | 
| 293   for (auto i : vec) { | 293   for (auto i : vec) { | 
| 294     CHECK_EQ(j, i); | 294     CHECK_EQ(j, i); | 
| 295     j += 11; | 295     j += 11; | 
| 296   } | 296   } | 
| 297 } | 297 } | 
| OLD | NEW | 
|---|