Index: pkg/analysis_server/test/analysis_notification_highlights_test.dart |
diff --git a/pkg/analysis_server/test/analysis_notification_highlights_test.dart b/pkg/analysis_server/test/analysis_notification_highlights_test.dart |
index 012bb7d801e00b2f6ab83c95c49204a69daeef83..f0b81c279c2d1978b93709dbfdfa2ddeddeb5923 100644 |
--- a/pkg/analysis_server/test/analysis_notification_highlights_test.dart |
+++ b/pkg/analysis_server/test/analysis_notification_highlights_test.dart |
@@ -34,8 +34,24 @@ class _AnalysisNotificationHighlightsTest extends AbstractAnalysisTest { |
return; |
} |
} |
- fail('Expected to find (offset=$offset; length=$length; type=$type) in\n' |
- '${regions.join('\n')}'); |
+ StringBuffer buffer = new StringBuffer(); |
+ buffer.write('Expected to find (type='); |
+ buffer.write(type.name); |
+ buffer.write('; offset='); |
+ buffer.write(offset); |
+ buffer.write('; length='); |
+ buffer.write(length); |
+ buffer.write(') in\n'); |
+ for (_HighlightRegion region in regions) { |
+ buffer.write(' (type='); |
+ buffer.write(region.type); |
+ buffer.write('; offset='); |
+ buffer.write(region.offset); |
+ buffer.write('; length='); |
+ buffer.write(region.length); |
+ buffer.write(') in\n'); |
+ } |
+ fail(buffer.toString()); |
} |
void assertHasRegion(HighlightType type, String search, [int length = -1]) { |
@@ -438,6 +454,28 @@ void f() {} |
}); |
} |
+ test_COMMENT() { |
+ addTestFile(''' |
+/** |
+ * documentation comment |
+ */ |
+void main() { |
+ // end-of-line comment |
+ my_function(1); |
+} |
+ |
+void my_function(String a) { |
+ /* block comment */ |
+} |
+'''); |
+ return prepareHighlights(() { |
+ // TODO(brianwilkerson) Make this test pass. |
+// assertHasRegion(HighlightType.COMMENT_END_OF_LINE, '//', 22); |
+// assertHasRegion(HighlightType.COMMENT_BLOCK, '/* b', 19); |
+// assertHasRegion(HighlightType.COMMENT_DOCUMENTATION, '/**', 32); |
+ }); |
+ } |
+ |
test_CONSTRUCTOR() { |
addTestFile(''' |
class AAA { |