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

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

Issue 11415065: Issue 6770. Support for @deprecated on library directive. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 2b6bd054576855aecdefaa943904423453adaecd..47df3b31c7ef442e132af04bd335a1bc58af152e 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
@@ -16,6 +16,7 @@ package com.google.dart.tools.ui.internal.text;
import com.google.common.collect.Maps;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.util.apache.StringUtils;
+import com.google.dart.tools.core.test.util.TestUtilities;
import com.google.dart.tools.internal.corext.refactoring.code.ExtractUtils;
import com.google.dart.tools.internal.corext.refactoring.util.ReflectionUtils;
import com.google.dart.tools.ui.internal.text.editor.SemanticHighlighting;
@@ -313,6 +314,7 @@ public class SemanticHighlightingTest extends AbstractDartTest {
public void test_deprecated() throws Exception {
preparePositions(
"// filler filler filler filler filler filler filler filler filler filler",
+ "const deprecated = 0;",
"class A {",
" @deprecated",
" m () {}",
@@ -327,6 +329,28 @@ public class SemanticHighlightingTest extends AbstractDartTest {
assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "m );");
}
+ public void test_deprecated_libraryImport() throws Exception {
+ setUnitContent("ModernLib.dart", new String[] {
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "library modernLib;",
+ ""});
+ setUnitContent("DeprecatedLib.dart", new String[] {
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "@deprecated",
+ "library deprecatedLib;",
+ "const deprecated = 0;",
+ ""});
+ preparePositions(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "library App;",
+ "import 'ModernLib.dart';",
+ "import 'DeprecatedLib.dart';",
+ "");
+ TestUtilities.processAllDeltaChanges();
+ String search = "'DeprecatedLib.dart'";
+ assertHasPosition(SemanticHighlightings.DEPRECATED_ELEMENT, findOffset(search), search.length());
+ }
+
public void test_directive_export() throws Exception {
preparePositions(
"// filler filler filler filler filler filler filler filler filler filler",
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightings.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698