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

Side by Side Diff: pkg/analyzer/test/generated/hint_code_test.dart

Issue 2298913003: Pull in test_reflective_loader 0.0.4 and switch analyzer to it. (Closed)
Patch Set: Fixes for review comments. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 analyzer.test.generated.hint_code_test; 5 library analyzer.test.generated.hint_code_test;
6 6
7 import 'package:analyzer/src/generated/engine.dart'; 7 import 'package:analyzer/src/generated/engine.dart';
8 import 'package:analyzer/src/generated/error.dart'; 8 import 'package:analyzer/src/generated/error.dart';
9 import 'package:analyzer/src/generated/parser.dart'; 9 import 'package:analyzer/src/generated/parser.dart';
10 import 'package:analyzer/src/generated/source_io.dart'; 10 import 'package:analyzer/src/generated/source_io.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart';
11 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
12 13
13 import '../reflective_tests.dart';
14 import '../utils.dart'; 14 import '../utils.dart';
15 import 'analysis_context_factory.dart'; 15 import 'analysis_context_factory.dart';
16 import 'resolver_test_case.dart'; 16 import 'resolver_test_case.dart';
17 17
18 main() { 18 main() {
19 initializeTestEnvironment(); 19 initializeTestEnvironment();
20 runReflectiveTests(HintCodeTest); 20 defineReflectiveTests(HintCodeTest);
21 } 21 }
22 22
23 @reflectiveTest 23 @reflectiveTest
24 class HintCodeTest extends ResolverTestCase { 24 class HintCodeTest extends ResolverTestCase {
25 @override 25 @override
26 void reset() { 26 void reset() {
27 analysisContext2 = AnalysisContextFactory.contextWithCoreAndPackages({ 27 analysisContext2 = AnalysisContextFactory.contextWithCoreAndPackages({
28 'package:meta/meta.dart': r''' 28 'package:meta/meta.dart': r'''
29 library meta; 29 library meta;
30 30
(...skipping 3882 matching lines...) Expand 10 before | Expand all | Expand 10 after
3913 n() { 3913 n() {
3914 var a = m(), b = m(); 3914 var a = m(), b = m();
3915 } 3915 }
3916 }'''); 3916 }''');
3917 computeLibrarySourceErrors(source); 3917 computeLibrarySourceErrors(source);
3918 assertErrors( 3918 assertErrors(
3919 source, [HintCode.USE_OF_VOID_RESULT, HintCode.USE_OF_VOID_RESULT]); 3919 source, [HintCode.USE_OF_VOID_RESULT, HintCode.USE_OF_VOID_RESULT]);
3920 verify([source]); 3920 verify([source]);
3921 } 3921 }
3922 } 3922 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698