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

Unified Diff: editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/local/computer/OutlineImplTest.java

Issue 311053005: Updates for the Outline API and use it in Editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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.server_test/src/com/google/dart/server/internal/local/computer/OutlineImplTest.java
diff --git a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/local/computer/OutlineImplTest.java b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/local/computer/OutlineImplTest.java
index 8331c8067b6c1001a12d8dd716e68abcfef78485..b741263c2d107eb9759c0d6f1dacaedca94a56fb 100644
--- a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/local/computer/OutlineImplTest.java
+++ b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/local/computer/OutlineImplTest.java
@@ -36,6 +36,8 @@ public class OutlineImplTest extends TestCase {
"name0",
1,
2,
+ 3,
+ 4,
true,
true,
"args0",
@@ -43,16 +45,51 @@ public class OutlineImplTest extends TestCase {
assertSame(parent, outline.getParent());
assertEquals(ElementKind.COMPILATION_UNIT, outline.getKind());
assertEquals("name0", outline.getName());
- assertEquals(1, outline.getOffset());
- assertEquals(2, outline.getLength());
+ assertEquals(1, outline.getNameOffset());
+ assertEquals(2, outline.getNameLength());
+ assertEquals(3, outline.getElementOffset());
+ assertEquals(4, outline.getElementLength());
assertTrue(outline.isAbstract());
assertFalse(outline.isPrivate());
assertTrue(outline.isStatic());
- assertEquals("args0", outline.getArguments());
+ assertEquals("args0", outline.getParameters());
assertEquals("returnType0", outline.getReturnType());
// children
outline.setChildren(children);
assertEquals(children, outline.getChildren());
}
+ public void test_isPrivate_private_class() throws Exception {
+ Outline parent = mock(Outline.class);
+ OutlineImpl outline = new OutlineImpl(
+ parent,
+ ElementKind.CLASS,
+ "_Class",
+ 1,
+ 2,
+ 3,
+ 4,
+ false,
+ false,
+ null,
+ null);
+ assertTrue(outline.isPrivate());
+ }
+
+ public void test_isPrivate_private_constructor() throws Exception {
+ Outline parent = mock(Outline.class);
+ OutlineImpl outline = new OutlineImpl(
+ parent,
+ ElementKind.CONSTRUCTOR,
+ "Class._constructor",
+ 1,
+ 2,
+ 3,
+ 4,
+ false,
+ false,
+ null,
+ null);
+ assertTrue(outline.isPrivate());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698