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

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

Issue 14205011: Issue 9845. Compare runtime types using ==. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 70dbf1c69646741f13d36bdeaea58fe58969c58a..929785dc1cb460671aa50378dcd09d779bd331e7 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
@@ -858,6 +858,30 @@ public class SemanticTest extends AbstractSemanticTest {
getFormattedSource(unit));
}
+ /**
+ * <p>
+ * https://code.google.com/p/dart/issues/detail?id=9845
+ */
+ public void test_expression_equals_Class() throws Exception {
+ setFileLines(
+ "test/Test.java",
+ toString(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "public class A {",
+ " boolean testA(Class a, Class b) {",
+ " return a == b;",
+ " }",
+ "}"));
+ Context context = new Context();
+ context.addSourceFolder(tmpFolder);
+ context.addSourceFiles(tmpFolder);
+ CompilationUnit unit = context.translate();
+ assertEquals(toString(//
+ "class A {",
+ " bool testA(Class a, Class b) => a == b;",
+ "}"), getFormattedSource(unit));
+ }
+
public void test_forbiddenNames_methods() throws Exception {
setFileLines(
"test/Test.java",

Powered by Google App Engine
This is Rietveld 408576698