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

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

Issue 1213813003: [es6] Remove harmony-classes flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove empty flags field from json Created 5 years, 6 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/scanner.cc ('k') | test/cctest/test-api.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 "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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 TEST(RegExpLiteral) { 517 TEST(RegExpLiteral) {
518 FunctionTester T("(function(a) { o = /b/; return o.test(a); })"); 518 FunctionTester T("(function(a) { o = /b/; return o.test(a); })");
519 519
520 T.CheckTrue(T.Val("abc")); 520 T.CheckTrue(T.Val("abc"));
521 T.CheckFalse(T.Val("xyz")); 521 T.CheckFalse(T.Val("xyz"));
522 } 522 }
523 523
524 524
525 TEST(ClassLiteral) { 525 TEST(ClassLiteral) {
526 FLAG_harmony_classes = true;
527 FLAG_harmony_sloppy = true; 526 FLAG_harmony_sloppy = true;
528 const char* src = 527 const char* src =
529 "(function(a,b) {" 528 "(function(a,b) {"
530 " class C {" 529 " class C {"
531 " x() { return a; }" 530 " x() { return a; }"
532 " static y() { return b; }" 531 " static y() { return b; }"
533 " get z() { return 0; }" 532 " get z() { return 0; }"
534 " constructor() {}" 533 " constructor() {}"
535 " }" 534 " }"
536 " return new C().x() + C.y();" 535 " return new C().x() + C.y();"
537 "})"; 536 "})";
538 FunctionTester T(src); 537 FunctionTester T(src);
539 538
540 T.CheckCall(T.Val(65), T.Val(23), T.Val(42)); 539 T.CheckCall(T.Val(65), T.Val(23), T.Val(42));
541 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b")); 540 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b"));
542 } 541 }
OLDNEW
« no previous file with comments | « src/scanner.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698