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

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

Issue 12803014: New Analysis Engine translation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
index 86f372513aa886557d92e89161a48f1129ec9835..9a1e90223e901db3615efaab49f394675751d54e 100644
--- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
+++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
@@ -1647,6 +1647,34 @@ public class SemanticTest extends AbstractSemanticTest {
getFormattedSource(unit));
}
+ public void test_tryCatch_Exception() throws Exception {
+ setFileLines(
+ "test/Test.java",
+ toString(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "public class Test {",
+ " void main() {",
+ " try {",
+ " } catch (Exception e) {",
+ " }",
+ "}"));
+ Context context = new Context();
+ context.addSourceFolder(tmpFolder);
+ context.addSourceFiles(tmpFolder);
+ // do translate
+ CompilationUnit unit = context.translate();
+ assertEquals(
+ toString(
+ "class Test {",
+ " void main() {",
+ " try {",
+ " } catch (e) {",
+ " }",
+ " }",
+ "}"),
+ getFormattedSource(unit));
+ }
+
public void test_varArgs() throws Exception {
setFileLines(
"test/Test.java",

Powered by Google App Engine
This is Rietveld 408576698