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

Side by Side Diff: pkg/analyzer/test/src/task/yaml_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.src.task.yaml_test; 5 library analyzer.test.src.task.yaml_test;
6 6
7 import 'package:analyzer/src/generated/source.dart'; 7 import 'package:analyzer/src/generated/source.dart';
8 import 'package:analyzer/src/task/yaml.dart'; 8 import 'package:analyzer/src/task/yaml.dart';
9 import 'package:analyzer/task/general.dart'; 9 import 'package:analyzer/task/general.dart';
10 import 'package:analyzer/task/yaml.dart'; 10 import 'package:analyzer/task/yaml.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart';
11 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
12 import 'package:yaml/yaml.dart'; 13 import 'package:yaml/yaml.dart';
13 14
14 import '../../reflective_tests.dart';
15 import '../../utils.dart'; 15 import '../../utils.dart';
16 import '../context/abstract_context.dart'; 16 import '../context/abstract_context.dart';
17 17
18 main() { 18 main() {
19 initializeTestEnvironment(); 19 initializeTestEnvironment();
20 runReflectiveTests(ParseYamlTaskTest); 20 defineReflectiveTests(ParseYamlTaskTest);
21 } 21 }
22 22
23 isInstanceOf isParseYamlTask = new isInstanceOf<ParseYamlTask>(); 23 isInstanceOf isParseYamlTask = new isInstanceOf<ParseYamlTask>();
24 24
25 @reflectiveTest 25 @reflectiveTest
26 class ParseYamlTaskTest extends AbstractContextTest { 26 class ParseYamlTaskTest extends AbstractContextTest {
27 Source source; 27 Source source;
28 28
29 test_perform() { 29 test_perform() {
30 _performParseTask(r''' 30 _performParseTask(r'''
(...skipping 30 matching lines...) Expand all
61 61
62 void _performParseTask(String content) { 62 void _performParseTask(String content) {
63 if (content == null) { 63 if (content == null) {
64 source = resourceProvider.getFile('/test.yaml').createSource(); 64 source = resourceProvider.getFile('/test.yaml').createSource();
65 } else { 65 } else {
66 source = newSource('/test.yaml', content); 66 source = newSource('/test.yaml', content);
67 } 67 }
68 computeResult(source, YAML_DOCUMENT, matcher: isParseYamlTask); 68 computeResult(source, YAML_DOCUMENT, matcher: isParseYamlTask);
69 } 69 }
70 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698