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

Unified Diff: test/command_line_test.dart

Issue 966443004: Don't rely on directory traversal order in test. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Bump version. Created 5 years, 10 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 | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/command_line_test.dart
diff --git a/test/command_line_test.dart b/test/command_line_test.dart
index 47f817a6eb1efdd893748a4339cb13ea5fbef854..b2cf84a0d7f5114efe593265714bb8bf7d1eb705 100644
--- a/test/command_line_test.dart
+++ b/test/command_line_test.dart
@@ -126,19 +126,23 @@ void main() {
d.file("b.dart", unformattedSource)
]).create();
- var process = runFormatterOnDir(["--machine"]);
-
- var json = {
+ var jsonA = JSON.encode({
"path": p.join("code", "a.dart"),
"source": formattedSource,
"selection": {"offset": -1, "length": -1}
- };
+ });
- process.stdout.expect(JSON.encode(json));
+ var jsonB = JSON.encode({
+ "path": p.join("code", "b.dart"),
+ "source": formattedSource,
+ "selection": {"offset": -1, "length": -1}
+ });
- json["path"] = p.join("code", "b.dart");
- process.stdout.expect(JSON.encode(json));
+ var process = runFormatterOnDir(["--machine"]);
+ // The order isn't specified.
+ process.stdout.expect(either(jsonA, jsonB));
+ process.stdout.expect(either(jsonA, jsonB));
process.shouldExit();
});
});
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698