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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/internal/text/SemanticHighlightingTest.java

Issue 211713002: Issue 17775. Semantic highlighting for function type alias. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/internal/text/SemanticHighlightingTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/internal/text/SemanticHighlightingTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/internal/text/SemanticHighlightingTest.java
index df445fe024ef16582f6a41e375c66f42be96a5cb..97c9f9c2d61a4c8ac72aa4f8f5608fc80ee7a101 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/internal/text/SemanticHighlightingTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/internal/text/SemanticHighlightingTest.java
@@ -600,6 +600,17 @@ public class SemanticHighlightingTest extends
assertHasWordPosition(SemanticHighlightings.FUNCTION, "f );");
}
+ public void test_functionTypeAlias() throws Exception {
+ preparePositions(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "typedef String Foo ();",
+ "main(Foo f) {",
+ "}",
+ "");
+ assertHasWordPosition(SemanticHighlightings.FUNCTION_TYPE_ALIAS, "Foo (");
+ assertHasWordPosition(SemanticHighlightings.FUNCTION_TYPE_ALIAS, "Foo f)");
+ }
+
public void test_getterDeclaration_function() throws Exception {
preparePositions(
"// filler filler filler filler filler filler filler filler filler filler",

Powered by Google App Engine
This is Rietveld 408576698