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

Side by Side Diff: test/cctest/compiler/test-run-jsops.cc

Issue 1858943002: Remove runtime flags for sloppy mode block scoping features (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 8 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 | « src/parsing/preparser.cc ('k') | test/cctest/test-asm-validator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "test/cctest/compiler/function-tester.h" 5 #include "test/cctest/compiler/function-tester.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 505
506 TEST(RegExpLiteral) { 506 TEST(RegExpLiteral) {
507 FunctionTester T("(function(a) { o = /b/; return o.test(a); })"); 507 FunctionTester T("(function(a) { o = /b/; return o.test(a); })");
508 508
509 T.CheckTrue(T.Val("abc")); 509 T.CheckTrue(T.Val("abc"));
510 T.CheckFalse(T.Val("xyz")); 510 T.CheckFalse(T.Val("xyz"));
511 } 511 }
512 512
513 513
514 TEST(ClassLiteral) { 514 TEST(ClassLiteral) {
515 FLAG_harmony_sloppy = true;
516 const char* src = 515 const char* src =
517 "(function(a,b) {" 516 "(function(a,b) {"
518 " class C {" 517 " class C {"
519 " x() { return a; }" 518 " x() { return a; }"
520 " static y() { return b; }" 519 " static y() { return b; }"
521 " get z() { return 0; }" 520 " get z() { return 0; }"
522 " constructor() {}" 521 " constructor() {}"
523 " }" 522 " }"
524 " return new C().x() + C.y();" 523 " return new C().x() + C.y();"
525 "})"; 524 "})";
526 FunctionTester T(src); 525 FunctionTester T(src);
527 526
528 T.CheckCall(T.Val(65), T.Val(23), T.Val(42)); 527 T.CheckCall(T.Val(65), T.Val(23), T.Val(42));
529 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b")); 528 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b"));
530 } 529 }
531 530
532 } // namespace compiler 531 } // namespace compiler
533 } // namespace internal 532 } // namespace internal
534 } // namespace v8 533 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/preparser.cc ('k') | test/cctest/test-asm-validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698