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

Side by Side Diff: test/unittests/compiler/typer-unittest.cc

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use Number() instead of OrderedNumber() to include NaN Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « test/unittests/compiler/js-operator-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 <functional> 5 #include <functional>
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "test/cctest/types-fuzz.h" 10 #include "test/cctest/types-fuzz.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 TEST_F(TyperTest, TypeJSDivide) { 242 TEST_F(TyperTest, TypeJSDivide) {
243 TestBinaryArithOp(javascript_.Divide(), std::divides<double>()); 243 TestBinaryArithOp(javascript_.Divide(), std::divides<double>());
244 } 244 }
245 245
246 246
247 TEST_F(TyperTest, TypeJSModulus) { 247 TEST_F(TyperTest, TypeJSModulus) {
248 TestBinaryArithOp(javascript_.Modulus(), modulo); 248 TestBinaryArithOp(javascript_.Modulus(), modulo);
249 } 249 }
250 250
251 251
252 TEST_F(TyperTest, TypeJSExponentiate) {
253 TestBinaryArithOp(javascript_.Exponentiate(), power_helper);
254 }
255
256
252 TEST_F(TyperTest, TypeJSBitwiseOr) { 257 TEST_F(TyperTest, TypeJSBitwiseOr) {
253 TestBinaryBitOp(javascript_.BitwiseOr(), bit_or); 258 TestBinaryBitOp(javascript_.BitwiseOr(), bit_or);
254 } 259 }
255 260
256 261
257 TEST_F(TyperTest, TypeJSBitwiseAnd) { 262 TEST_F(TyperTest, TypeJSBitwiseAnd) {
258 TestBinaryBitOp(javascript_.BitwiseAnd(), bit_and); 263 TestBinaryBitOp(javascript_.BitwiseAnd(), bit_and);
259 } 264 }
260 265
261 266
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 362
358 363
359 TEST_F(TyperTest, TypeRegressInt32Constant) { 364 TEST_F(TyperTest, TypeRegressInt32Constant) {
360 int values[] = {-5, 10}; 365 int values[] = {-5, 10};
361 for (auto i : values) { 366 for (auto i : values) {
362 Node* c = graph()->NewNode(common()->Int32Constant(i)); 367 Node* c = graph()->NewNode(common()->Int32Constant(i));
363 Type* type = NodeProperties::GetBounds(c).upper; 368 Type* type = NodeProperties::GetBounds(c).upper;
364 EXPECT_TRUE(type->Is(NewRange(i, i))); 369 EXPECT_TRUE(type->Is(NewRange(i, i)));
365 } 370 }
366 } 371 }
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-operator-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698