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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "test/cctest/compiler/function-tester.h" | 7 #include "test/cctest/compiler/function-tester.h" |
8 | 8 |
9 using namespace v8::internal; | 9 using namespace v8::internal; |
10 using namespace v8::internal::compiler; | 10 using namespace v8::internal::compiler; |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 T.CheckFalse(-8, -8.1); | 205 T.CheckFalse(-8, -8.1); |
206 T.CheckFalse(0.111, 0.111); | 206 T.CheckFalse(0.111, 0.111); |
207 | 207 |
208 T.CheckFalse(T.Val("7.1"), T.Val("7.1")); | 208 T.CheckFalse(T.Val("7.1"), T.Val("7.1")); |
209 T.CheckFalse(T.Val(7.1), T.Val("6.1")); | 209 T.CheckFalse(T.Val(7.1), T.Val("6.1")); |
210 T.CheckFalse(T.Val(7.1), T.Val("7.1")); | 210 T.CheckFalse(T.Val(7.1), T.Val("7.1")); |
211 T.CheckTrue(T.Val(7.1), T.Val("8.1")); | 211 T.CheckTrue(T.Val(7.1), T.Val("8.1")); |
212 } | 212 } |
213 | 213 |
214 | 214 |
215 TEST(BinopLessThanEqual) { | 215 TEST(BinopLessThanOrEqual) { |
216 FunctionTester T("(function(a,b) { return a <= b; })"); | 216 FunctionTester T("(function(a,b) { return a <= b; })"); |
217 | 217 |
218 T.CheckTrue(7, 8); | 218 T.CheckTrue(7, 8); |
219 T.CheckFalse(8, 7); | 219 T.CheckFalse(8, 7); |
220 T.CheckTrue(-8.1, -8); | 220 T.CheckTrue(-8.1, -8); |
221 T.CheckFalse(-8, -8.1); | 221 T.CheckFalse(-8, -8.1); |
222 T.CheckTrue(0.111, 0.111); | 222 T.CheckTrue(0.111, 0.111); |
223 | 223 |
224 T.CheckTrue(T.Val("7.1"), T.Val("7.1")); | 224 T.CheckTrue(T.Val("7.1"), T.Val("7.1")); |
225 T.CheckFalse(T.Val(7.1), T.Val("6.1")); | 225 T.CheckFalse(T.Val(7.1), T.Val("6.1")); |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 " get z() { return 0; }" | 536 " get z() { return 0; }" |
537 " constructor() {}" | 537 " constructor() {}" |
538 " }" | 538 " }" |
539 " return new C().x() + C.y();" | 539 " return new C().x() + C.y();" |
540 "})"; | 540 "})"; |
541 FunctionTester T(src); | 541 FunctionTester T(src); |
542 | 542 |
543 T.CheckCall(T.Val(65), T.Val(23), T.Val(42)); | 543 T.CheckCall(T.Val(65), T.Val(23), T.Val(42)); |
544 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b")); | 544 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b")); |
545 } | 545 } |
OLD | NEW |