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

Unified Diff: test/command_line_test.dart

Issue 1182953003: Eat some dogfood! (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 6 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
Index: test/command_line_test.dart
diff --git a/test/command_line_test.dart b/test/command_line_test.dart
index 52cd9016de9838b0662fa53441103cdbe9ef8acf..de644490e4d69c44a6b85014eb722c4b6a346d47 100644
--- a/test/command_line_test.dart
+++ b/test/command_line_test.dart
@@ -17,9 +17,7 @@ void main() {
setUpTestSuite();
test("Exits with 0 on success.", () {
- d.dir("code", [
- d.file("a.dart", unformattedSource)
- ]).create();
+ d.dir("code", [d.file("a.dart", unformattedSource)]).create();
var process = runFormatterOnDir();
process.shouldExit(0);
@@ -31,54 +29,42 @@ void main() {
});
test("Exits with 65 on a parse error.", () {
- d.dir("code", [
- d.file("a.dart", "herp derp i are a dart")
- ]).create();
+ d.dir("code", [d.file("a.dart", "herp derp i are a dart")]).create();
var process = runFormatterOnDir();
process.shouldExit(65);
});
test("Errors if --dry-run and --overwrite are both passed.", () {
- d.dir("code", [
- d.file("a.dart", unformattedSource)
- ]).create();
+ d.dir("code", [d.file("a.dart", unformattedSource)]).create();
var process = runFormatterOnDir(["--dry-run", "--overwrite"]);
process.shouldExit(64);
});
test("Errors if --dry-run and --machine are both passed.", () {
- d.dir("code", [
- d.file("a.dart", unformattedSource)
- ]).create();
+ d.dir("code", [d.file("a.dart", unformattedSource)]).create();
var process = runFormatterOnDir(["--dry-run", "--machine"]);
process.shouldExit(64);
});
test("Errors if --machine and --overwrite are both passed.", () {
- d.dir("code", [
- d.file("a.dart", unformattedSource)
- ]).create();
+ d.dir("code", [d.file("a.dart", unformattedSource)]).create();
var process = runFormatterOnDir(["--machine", "--overwrite"]);
process.shouldExit(64);
});
test("Errors if --dry-run and --machine are both passed.", () {
- d.dir("code", [
- d.file("a.dart", unformattedSource)
- ]).create();
+ d.dir("code", [d.file("a.dart", unformattedSource)]).create();
var process = runFormatter(["--dry-run", "--machine"]);
process.shouldExit(64);
});
test("Errors if --machine and --overwrite are both passed.", () {
- d.dir("code", [
- d.file("a.dart", unformattedSource)
- ]).create();
+ d.dir("code", [d.file("a.dart", unformattedSource)]).create();
var process = runFormatter(["--machine", "--overwrite"]);
process.shouldExit(64);
@@ -105,17 +91,13 @@ void main() {
});
test("does not modify files.", () {
- d.dir("code", [
- d.file("a.dart", unformattedSource)
- ]).create();
+ d.dir("code", [d.file("a.dart", unformattedSource)]).create();
var process = runFormatterOnDir(["--dry-run"]);
process.stdout.expect(p.join("code", "a.dart"));
process.shouldExit();
- d.dir('code', [
- d.file('a.dart', unformattedSource)
- ]).validate();
+ d.dir('code', [d.file('a.dart', unformattedSource)]).validate();
});
});

Powered by Google App Engine
This is Rietveld 408576698