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

Unified Diff: pkg/analysis_server/test/analysis_notification_highlights_test.dart

Issue 559353003: Semantic highlighting for LABEL elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/test/computer/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d4ecdde33dab646851e6f4bad36da2c33dfb8872..28b5b8267aa8229ce63f8a2dc46ef3d4f420f6dd 100644
--- a/pkg/analysis_server/test/analysis_notification_highlights_test.dart
+++ b/pkg/analysis_server/test/analysis_notification_highlights_test.dart
@@ -8,10 +8,10 @@ import 'dart:async';
import 'package:analysis_server/src/constants.dart';
import 'package:analysis_server/src/protocol.dart';
-import 'reflective_tests.dart';
import 'package:unittest/unittest.dart';
import 'analysis_abstract.dart';
+import 'reflective_tests.dart';
main() {
@@ -706,6 +706,21 @@ void main() {
});
}
+ test_LABEL() {
+ addTestFile('''
+main() {
+myLabel:
+ while (true) {
+ break myLabel;
+ }
+}
+''');
+ return prepareHighlights().then((_) {
+ assertHasRegion(HighlightRegionType.LABEL, 'myLabel:');
+ assertHasRegion(HighlightRegionType.LABEL, 'myLabel;');
+ });
+ }
+
test_LITERAL_BOOLEAN() {
addTestFile('var V = true;');
return prepareHighlights().then((_) {
@@ -890,16 +905,16 @@ part 'test.dart';
@ReflectiveTestCase()
class HighlightTypeTest {
- void test_toString() {
- expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS');
- }
-
void test_constructor() {
expect(
HighlightRegionType.CLASS,
new HighlightRegionType(HighlightRegionType.CLASS.name));
}
+ void test_toString() {
+ expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS');
+ }
+
void test_valueOf_unknown() {
expect(() {
new HighlightRegionType('no-such-type');
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/test/computer/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698