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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/extract_local_test.dart

Issue 2402483002: Remove 'initializeTestEnvironment' from 'analysis_server'. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.refactoring.extract_local; 5 library test.services.refactoring.extract_local;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:analysis_server/plugin/protocol/protocol.dart'; 10 import 'package:analysis_server/plugin/protocol/protocol.dart';
11 import 'package:analysis_server/src/services/correction/status.dart'; 11 import 'package:analysis_server/src/services/correction/status.dart';
12 import 'package:analysis_server/src/services/refactoring/extract_local.dart'; 12 import 'package:analysis_server/src/services/refactoring/extract_local.dart';
13 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 13 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
14 import 'package:test/test.dart'; 14 import 'package:test/test.dart';
15 import 'package:test_reflective_loader/test_reflective_loader.dart'; 15 import 'package:test_reflective_loader/test_reflective_loader.dart';
16 16
17 import '../../utils.dart';
18 import 'abstract_refactoring.dart'; 17 import 'abstract_refactoring.dart';
19 18
20 main() { 19 main() {
21 initializeTestEnvironment();
22 defineReflectiveSuite(() { 20 defineReflectiveSuite(() {
23 defineReflectiveTests(ExtractLocalTest); 21 defineReflectiveTests(ExtractLocalTest);
24 }); 22 });
25 } 23 }
26 24
27 @reflectiveTest 25 @reflectiveTest
28 class ExtractLocalTest extends RefactoringTest { 26 class ExtractLocalTest extends RefactoringTest {
29 ExtractLocalRefactoringImpl refactoring; 27 ExtractLocalRefactoringImpl refactoring;
30 28
31 test_checkFinalConditions_sameVariable_after() async { 29 test_checkFinalConditions_sameVariable_after() async {
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 List<String> _getCoveringExpressions() { 1339 List<String> _getCoveringExpressions() {
1342 List<String> subExpressions = <String>[]; 1340 List<String> subExpressions = <String>[];
1343 for (int i = 0; i < refactoring.coveringExpressionOffsets.length; i++) { 1341 for (int i = 0; i < refactoring.coveringExpressionOffsets.length; i++) {
1344 int offset = refactoring.coveringExpressionOffsets[i]; 1342 int offset = refactoring.coveringExpressionOffsets[i];
1345 int length = refactoring.coveringExpressionLengths[i]; 1343 int length = refactoring.coveringExpressionLengths[i];
1346 subExpressions.add(testCode.substring(offset, offset + length)); 1344 subExpressions.add(testCode.substring(offset, offset + length));
1347 } 1345 }
1348 return subExpressions; 1346 return subExpressions;
1349 } 1347 }
1350 } 1348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698