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

Unified Diff: test/webkit/class-syntax-scoping.js

Issue 1109783003: Import JSC class tests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/webkit/class-syntax-prototype-expected.txt ('k') | test/webkit/class-syntax-scoping-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/class-syntax-scoping.js
diff --git a/test/webkit/dfg-uint32-to-number-on-captured-variable.js b/test/webkit/class-syntax-scoping.js
similarity index 80%
copy from test/webkit/dfg-uint32-to-number-on-captured-variable.js
copy to test/webkit/class-syntax-scoping.js
index 123655453fa178f6abb8b9c562b47d00d53d8b4a..02f5a1ee0474a835aaca850cd522bab16d51b429 100644
--- a/test/webkit/dfg-uint32-to-number-on-captured-variable.js
+++ b/test/webkit/class-syntax-scoping.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2015 the V8 project authors. All rights reserved.
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -21,16 +21,19 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-description(
-"Tests that storing the result of a uint32 to number conversion into a captured variable does not crash the compiler."
-);
+// Flags: --harmony-sloppy
-function foo(a) {
- var x = a >>> 0;
- return (function() {
- return x;
- });
+description('Tests for scoping of variables in ES6 class syntax');
+
+var local = "FAIL";
+function test() {
+ var local = "PASS";
+ class A {
+ getLocal(x) { return local; }
+ };
+ return new A().getLocal();
}
-for (var i = 0; i < 100; ++i)
- shouldBe("foo(" + i + ")()", "" + i);
+shouldBe('test()', '"PASS"');
+
+var successfullyParsed = true;
« no previous file with comments | « test/webkit/class-syntax-prototype-expected.txt ('k') | test/webkit/class-syntax-scoping-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698