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; |