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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/search/SearchEngineTest.java

Issue 11314019: Using 'interface' and 'abstract' for methods should produce error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/search/SearchEngineTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/search/SearchEngineTest.java b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/search/SearchEngineTest.java
index e8a23661a64bf38adaec0a473d1874d0192ca5dd..989e4b77253975106a82932b795f6c37446178fd 100644
--- a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/search/SearchEngineTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/search/SearchEngineTest.java
@@ -620,70 +620,6 @@ public class SearchEngineTest extends TestCase {
}
}
- public void test_searchReferences_method_constructor_interfaceFactory_notImplementedByDefault()
- throws Exception {
- TestProject testProject = new TestProject();
- try {
- String source = buildSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "interface I default A {",
- " I();",
- "}",
- "class A {",
- " factory I() {}",
- "}",
- "main() {",
- " new I(); // use",
- "}",
- "");
- CompilationUnit unit = testProject.setUnitContent("Test.dart", source);
- indexUnits(unit);
- // find references
- Method method = findElement(unit, "I() {}");
- List<SearchMatch> matches = getMethodReferences(method);
- assertThat(matches).hasSize(1);
- // assert references
- SearchMatch match = matches.get(0);
- SourceRange matchRange = match.getSourceRange();
- assertEquals(source.indexOf("I(); // use"), matchRange.getOffset());
- assertEquals(1, matchRange.getLength());
- } finally {
- testProject.dispose();
- }
- }
-
- public void test_searchReferences_method_constructor_interfaceFactory_notImplementedByDefault_named()
- throws Exception {
- TestProject testProject = new TestProject();
- try {
- String source = buildSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "interface I default A {",
- " I.test();",
- "}",
- "class A {",
- " factory I.test() {}",
- "}",
- "main() {",
- " new I.test(); // use",
- "}",
- "");
- CompilationUnit unit = testProject.setUnitContent("Test.dart", source);
- indexUnits(unit);
- // find references
- Method method = unit.getType("A").getMethod("I.test", null);
- List<SearchMatch> matches = getMethodReferences(method);
- assertThat(matches).hasSize(1);
- // assert references
- SearchMatch match = matches.get(0);
- SourceRange matchRange = match.getSourceRange();
- assertEquals(source.indexOf("I.test(); // use"), matchRange.getOffset());
- assertEquals("I.test".length(), matchRange.getLength());
- } finally {
- testProject.dispose();
- }
- }
-
public void test_searchReferences_method_constructorNamed() throws Exception {
TestProject testProject = new TestProject();
try {

Powered by Google App Engine
This is Rietveld 408576698