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

Unified Diff: pkg/analysis_server/test/integration/analysis/get_hover_test.dart

Issue 1266923004: More fixes for failures on the Windows bot (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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: pkg/analysis_server/test/integration/analysis/get_hover_test.dart
diff --git a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
index 3928d99c97215ca2b4b4aa53085be31a9100c61e..af43a3c078e5fcfd70c22fd97a059a48e9ffd8ea 100644
--- a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
@@ -11,9 +11,11 @@ import 'package:path/path.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(AnalysisGetHoverIntegrationTest);
}
@@ -62,9 +64,13 @@ main() {
* expected propagated type of the element.
*/
checkHover(String target, int length, List<String> descriptionRegexps,
- String kind, List<String> staticTypeRegexps, {bool isLocal: false,
- bool isCore: false, String docRegexp: null, bool isLiteral: false,
- List<String> parameterRegexps: null, propagatedType: null}) {
+ String kind, List<String> staticTypeRegexps,
+ {bool isLocal: false,
+ bool isCore: false,
+ String docRegexp: null,
+ bool isLiteral: false,
+ List<String> parameterRegexps: null,
+ propagatedType: null}) {
int offset = text.indexOf(target);
return sendAnalysisGetHover(pathname, offset).then((result) {
expect(result.hovers, hasLength(1));
@@ -141,10 +147,8 @@ main() {
// request is made. So wait for analysis to finish before testing anything.
return analysisFinished.then((_) {
List<Future> tests = [];
- tests.add(checkHover('topLevelVar;', 11, [
- 'List',
- 'topLevelVar'
- ], 'top level variable', ['List']));
+ tests.add(checkHover('topLevelVar;', 11, ['List', 'topLevelVar'],
+ 'top level variable', ['List']));
tests.add(checkHover(
'func(', 4, ['func', 'int', 'param'], 'function', ['int', 'void'],
docRegexp: 'Documentation for func'));
@@ -157,10 +161,8 @@ main() {
tests.add(checkHover(
'localVar =', 8, ['num', 'localVar'], 'local variable', ['num'],
isLocal: true, propagatedType: 'int'));
- tests.add(checkHover('topLevelVar.length;', 11, [
- 'List',
- 'topLevelVar'
- ], 'top level variable', ['List']));
+ tests.add(checkHover('topLevelVar.length;', 11, ['List', 'topLevelVar'],
+ 'top level variable', ['List']));
tests.add(checkHover(
'length;', 6, ['get', 'length', 'int'], 'getter', ['int'],
isCore: true, docRegexp: '.*'));

Powered by Google App Engine
This is Rietveld 408576698