| OLD | NEW |
| 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/test.dart'; | 11 import 'package:test/test.dart'; |
| 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 13 import 'package:yaml/yaml.dart'; | 13 import 'package:yaml/yaml.dart'; |
| 14 | 14 |
| 15 import '../../utils.dart'; | |
| 16 import '../context/abstract_context.dart'; | 15 import '../context/abstract_context.dart'; |
| 17 | 16 |
| 18 main() { | 17 main() { |
| 19 initializeTestEnvironment(); | |
| 20 defineReflectiveSuite(() { | 18 defineReflectiveSuite(() { |
| 21 defineReflectiveTests(ParseYamlTaskTest); | 19 defineReflectiveTests(ParseYamlTaskTest); |
| 22 }); | 20 }); |
| 23 } | 21 } |
| 24 | 22 |
| 25 isInstanceOf isParseYamlTask = new isInstanceOf<ParseYamlTask>(); | 23 isInstanceOf isParseYamlTask = new isInstanceOf<ParseYamlTask>(); |
| 26 | 24 |
| 27 @reflectiveTest | 25 @reflectiveTest |
| 28 class ParseYamlTaskTest extends AbstractContextTest { | 26 class ParseYamlTaskTest extends AbstractContextTest { |
| 29 Source source; | 27 Source source; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 61 |
| 64 void _performParseTask(String content) { | 62 void _performParseTask(String content) { |
| 65 if (content == null) { | 63 if (content == null) { |
| 66 source = resourceProvider.getFile('/test.yaml').createSource(); | 64 source = resourceProvider.getFile('/test.yaml').createSource(); |
| 67 } else { | 65 } else { |
| 68 source = newSource('/test.yaml', content); | 66 source = newSource('/test.yaml', content); |
| 69 } | 67 } |
| 70 computeResult(source, YAML_DOCUMENT, matcher: isParseYamlTask); | 68 computeResult(source, YAML_DOCUMENT, matcher: isParseYamlTask); |
| 71 } | 69 } |
| 72 } | 70 } |
| OLD | NEW |