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

Side by Side Diff: pkg/analysis_server/test/services/linter/linter_test.dart

Issue 2394683006: Switch analysis_server to use 'package:test'. (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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.linter; 5 library test.services.linter;
6 6
7 import 'package:analysis_server/src/services/linter/linter.dart'; 7 import 'package:analysis_server/src/services/linter/linter.dart';
8 import 'package:analyzer/analyzer.dart'; 8 import 'package:analyzer/analyzer.dart';
9 import 'package:analyzer/source/analysis_options_provider.dart'; 9 import 'package:analyzer/source/analysis_options_provider.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
11 import 'package:analyzer/src/generated/source.dart'; 11 import 'package:analyzer/src/generated/source.dart';
12 import 'package:test/test.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 13 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:unittest/unittest.dart';
14 14
15 import '../../utils.dart'; 15 import '../../utils.dart';
16 16
17 main() { 17 main() {
18 initializeTestEnvironment(); 18 initializeTestEnvironment();
19 defineReflectiveTests(LinterRuleOptionsValidatorTest); 19 defineReflectiveSuite(() {
20 defineReflectiveTests(LinterRuleOptionsValidatorTest);
21 });
20 } 22 }
21 23
22 @reflectiveTest 24 @reflectiveTest
23 class LinterRuleOptionsValidatorTest { 25 class LinterRuleOptionsValidatorTest {
24 final LinterRuleOptionsValidator validator = new LinterRuleOptionsValidator(); 26 final LinterRuleOptionsValidator validator = new LinterRuleOptionsValidator();
25 final AnalysisOptionsProvider optionsProvider = new AnalysisOptionsProvider(); 27 final AnalysisOptionsProvider optionsProvider = new AnalysisOptionsProvider();
26 28
27 RecordingErrorListener recorder; 29 RecordingErrorListener recorder;
28 ErrorReporter reporter; 30 ErrorReporter reporter;
29 31
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 validator.validate(reporter, options); 81 validator.validate(reporter, options);
80 expect(errors.map((AnalysisError e) => e.errorCode), 82 expect(errors.map((AnalysisError e) => e.errorCode),
81 unorderedEquals(expected)); 83 unorderedEquals(expected));
82 } 84 }
83 } 85 }
84 86
85 class _TestSource implements Source { 87 class _TestSource implements Source {
86 @override 88 @override
87 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 89 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
88 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698