Index: pkg/analysis_server/test/integration/analysis/highlights_test.dart |
diff --git a/pkg/analysis_server/test/integration/analysis/highlights_test.dart b/pkg/analysis_server/test/integration/analysis/highlights_test.dart |
index b466ff66660c3106fb92fe433fb439d7b24e2d9a..884c2321be4dfd4f06b6f213cd10c3d64367bb7b 100644 |
--- a/pkg/analysis_server/test/integration/analysis/highlights_test.dart |
+++ b/pkg/analysis_server/test/integration/analysis/highlights_test.dart |
@@ -8,9 +8,11 @@ import 'package:analysis_server/src/protocol.dart'; |
import 'package:test_reflective_loader/test_reflective_loader.dart'; |
import 'package:unittest/unittest.dart'; |
+import '../../utils.dart'; |
import '../integration_tests.dart'; |
main() { |
+ initializeTestEnvironment(); |
defineReflectiveTests(AnalysisHighlightsTest); |
} |
@@ -70,7 +72,9 @@ int topLevelVariable; |
'''; |
writeFile(pathname, text); |
standardAnalysisSetup(); |
- sendAnalysisSetSubscriptions({AnalysisService.HIGHLIGHTS: [pathname]}); |
+ sendAnalysisSetSubscriptions({ |
+ AnalysisService.HIGHLIGHTS: [pathname] |
+ }); |
// Map from highlight type to highlighted text |
Map<HighlightRegionType, Set<String>> highlights; |
onAnalysisHighlights.listen((AnalysisHighlightsParams params) { |
@@ -96,21 +100,10 @@ int topLevelVariable; |
highlights.remove(type); |
} |
check(HighlightRegionType.ANNOTATION, ['@override']); |
- check(HighlightRegionType.BUILT_IN, [ |
- 'as', |
- 'get', |
- 'import', |
- 'set', |
- 'static', |
- 'typedef' |
- ]); |
- check(HighlightRegionType.CLASS, [ |
- 'Class', |
- 'Class2', |
- 'Future', |
- 'Map', |
- 'int' |
- ]); |
+ check(HighlightRegionType.BUILT_IN, |
+ ['as', 'get', 'import', 'set', 'static', 'typedef']); |
+ check(HighlightRegionType.CLASS, |
+ ['Class', 'Class2', 'Future', 'Map', 'int']); |
check(HighlightRegionType.COMMENT_BLOCK, ['/* Block comment */']); |
check(HighlightRegionType.COMMENT_DOCUMENTATION, |
['/**\n * Doc comment\n */']); |
@@ -132,10 +125,8 @@ int topLevelVariable; |
check(HighlightRegionType.LITERAL_DOUBLE, ['1.0']); |
check(HighlightRegionType.LITERAL_INTEGER, ['2', '42']); |
check(HighlightRegionType.LITERAL_LIST, ['[]']); |
- check(HighlightRegionType.LITERAL_MAP, [ |
- '{1.0: [].toList()}', |
- '{2: local}' |
- ]); |
+ check(HighlightRegionType.LITERAL_MAP, |
+ ['{1.0: [].toList()}', '{2: local}']); |
check(HighlightRegionType.LITERAL_STRING, ["'dart:async'", "'string'"]); |
check(HighlightRegionType.LOCAL_VARIABLE, ['local']); |
check(HighlightRegionType.LOCAL_VARIABLE_DECLARATION, ['local']); |
@@ -145,10 +136,8 @@ int topLevelVariable; |
check(HighlightRegionType.METHOD_STATIC, ['wait']); |
check(HighlightRegionType.PARAMETER, ['parameter']); |
check(HighlightRegionType.SETTER_DECLARATION, ['setter']); |
- check(HighlightRegionType.TOP_LEVEL_VARIABLE, [ |
- 'override', |
- 'topLevelVariable' |
- ]); |
+ check(HighlightRegionType.TOP_LEVEL_VARIABLE, |
+ ['override', 'topLevelVariable']); |
check(HighlightRegionType.TYPE_NAME_DYNAMIC, ['dynamic']); |
check(HighlightRegionType.TYPE_PARAMETER, ['TypeParameter']); |
expect(highlights, isEmpty); |