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

Unified Diff: test/driver_test.dart

Issue 1378193004: Fix Analysis Engine plugin setup. (Closed) Base URL: https://github.com/dart-lang/analyzer_cli.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/driver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/driver_test.dart
diff --git a/test/driver_test.dart b/test/driver_test.dart
index e676d4c873fecd8f4600f9344e368df397625ebc..0e9795e9f89c2b59b9d19092f941cca11fb57f86 100644
--- a/test/driver_test.dart
+++ b/test/driver_test.dart
@@ -35,15 +35,26 @@ main() {
});
group('linter', () {
- test('gets analysis options', () {
- Driver driver = new Driver();
+ StringSink savedOutSink;
+ Driver driver;
+
+ setUp(() {
+ savedOutSink = outSink;
+ outSink = new StringBuffer();
+
+ driver = new Driver();
driver.start([
'--options',
'test/data/linter_project/.analysis_options',
'--lints',
'test/data/linter_project/test_file.dart'
]);
+ });
+ tearDown(() {
+ outSink = savedOutSink;
+ });
+ test('gets analysis options', () {
/// Lints should be enabled.
expect(driver.context.analysisOptions.lint, isTrue);
@@ -51,6 +62,11 @@ main() {
var lintNames = linterPlugin.lintRules.map((r) => r.name);
expect(lintNames, orderedEquals(['camel_case_types']));
});
+
+ test('generates lints', () {
+ expect(outSink.toString(),
+ contains('[lint] Name types using UpperCamelCase.'));
+ });
});
group('in temp directory', () {
@@ -139,8 +155,8 @@ main() {}
]);
expect(
errorSink.toString(),
- equals(
- 'Plugin configuration skipped: Unrecognized plugin config format, expected `YamlMap`, got `YamlList` (line 2, column 4)\n'));
+ equals('Plugin configuration skipped: Unrecognized plugin config '
+ 'format, expected `YamlMap`, got `YamlList` (line 2, column 4)\n'));
});
test('plugin config', () {
BootLoader loader = new BootLoader();
« no previous file with comments | « lib/src/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698