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

Unified Diff: editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java

Issue 16337007: Version 0.5.13.1 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 7 years, 7 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
Index: editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
===================================================================
--- editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java (revision 23549)
+++ editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java (working copy)
@@ -888,6 +888,39 @@
"}"), getFormattedSource(unit));
}
+ public void test_forbiddenNames_forEach() throws Exception {
+ File file = setFileLines(
+ "test/Test.java",
+ toString(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "package test;",
+ "public class Test {",
+ " static void main(String [] vars) {",
+ " for (String var: vars) {",
+ " print(var);",
+ " }",
+ " }",
+ " static void print(String p) {}",
+ "}",
+ ""));
+ Context context = new Context();
+ context.addSourceFolder(tmpFolder);
+ context.addSourceFile(file);
+ CompilationUnit unit = context.translate();
+ assertEquals(
+ toString(
+ "class Test {",
+ " static void main(List<String> vars) {",
+ " for (String var2 in vars) {",
+ " print(var2);",
+ " }",
+ " }",
+ " static void print(String p) {",
+ " }",
+ "}"),
+ getFormattedSource(unit));
+ }
+
public void test_forbiddenNames_methods() throws Exception {
setFileLines(
"test/Test.java",

Powered by Google App Engine
This is Rietveld 408576698