OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cmath> | 5 #include <cmath> |
6 #include <functional> | 6 #include <functional> |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/utils/random-number-generator.h" |
10 #include "src/codegen.h" | 11 #include "src/codegen.h" |
11 #include "test/cctest/cctest.h" | 12 #include "test/cctest/cctest.h" |
12 #include "test/cctest/compiler/codegen-tester.h" | 13 #include "test/cctest/compiler/codegen-tester.h" |
13 #include "test/cctest/compiler/value-helper.h" | 14 #include "test/cctest/compiler/value-helper.h" |
14 | 15 |
15 #if V8_TURBOFAN_TARGET | 16 #if V8_TURBOFAN_TARGET |
16 | 17 |
17 using namespace v8::base; | 18 using namespace v8::base; |
18 using namespace v8::internal; | 19 using namespace v8::internal; |
19 using namespace v8::internal::compiler; | 20 using namespace v8::internal::compiler; |
(...skipping 5123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5143 m.Return(m.Int32Constant(0)); | 5144 m.Return(m.Int32Constant(0)); |
5144 for (size_t i = 0; i < arraysize(kValues); ++i) { | 5145 for (size_t i = 0; i < arraysize(kValues); ++i) { |
5145 input = kValues[i]; | 5146 input = kValues[i]; |
5146 CHECK_EQ(0, m.Call()); | 5147 CHECK_EQ(0, m.Call()); |
5147 double expected = round(kValues[i]); | 5148 double expected = round(kValues[i]); |
5148 CHECK_EQ(expected, result); | 5149 CHECK_EQ(expected, result); |
5149 } | 5150 } |
5150 } | 5151 } |
5151 | 5152 |
5152 #endif // V8_TURBOFAN_TARGET | 5153 #endif // V8_TURBOFAN_TARGET |
OLD | NEW |