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

Unified Diff: tests/standalone/io/platform_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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: tests/standalone/io/platform_test.dart
diff --git a/tests/standalone/io/platform_test.dart b/tests/standalone/io/platform_test.dart
index dd8defda58db0d6b4329a5af6e64be0af442cea3..ccec95dbf25c11e3c625a91c0378a6aff29ae17e 100644
--- a/tests/standalone/io/platform_test.dart
+++ b/tests/standalone/io/platform_test.dart
@@ -12,8 +12,8 @@ import "package:expect/expect.dart";
test() {
Expect.isTrue(Platform.numberOfProcessors > 0);
var os = Platform.operatingSystem;
- Expect.isTrue(os == "android" || os == "linux" || os == "macos" ||
- os == "windows");
+ Expect.isTrue(
+ os == "android" || os == "linux" || os == "macos" || os == "windows");
Expect.equals(Platform.isLinux, Platform.operatingSystem == "linux");
Expect.equals(Platform.isMacOS, Platform.operatingSystem == "macos");
Expect.equals(Platform.isWindows, Platform.operatingSystem == "windows");
@@ -43,8 +43,8 @@ test() {
// Move directory to be sure script is correct.
var oldDir = Directory.current;
Directory.current = Directory.current.parent;
- Expect.isTrue(Platform.script.path.
- endsWith('tests/standalone/io/platform_test.dart'));
+ Expect.isTrue(
+ Platform.script.path.endsWith('tests/standalone/io/platform_test.dart'));
Expect.isTrue(Platform.script.toFilePath().startsWith(oldDir.path));
// Restore dir.
Directory.current = oldDir;
@@ -53,23 +53,24 @@ test() {
Directory packageRoot = new Directory.fromUri(Uri.parse(pkgRootString));
Expect.isTrue(packageRoot.existsSync());
Expect.isTrue(new Directory("${packageRoot.path}/expect").existsSync());
- Expect.isTrue(Platform.executableArguments.any(
- (arg) {
- if (!arg.startsWith("--package-root=")) {
- return false;
- }
- // Cut out the '--package-root=' prefix.
- arg = arg.substring(15);
- return pkgRootString.contains(arg);
- }));
+ Expect.isTrue(Platform.executableArguments.any((arg) {
+ if (!arg.startsWith("--package-root=")) {
+ return false;
+ }
+ // Cut out the '--package-root=' prefix.
+ arg = arg.substring(15);
+ return pkgRootString.contains(arg);
+ }));
}
}
void f(reply) {
- reply.send({"Platform.executable": Platform.executable,
- "Platform.script": Platform.script,
- "Platform.packageRoot": Platform.packageRoot,
- "Platform.executableArguments": Platform.executableArguments});
+ reply.send({
+ "Platform.executable": Platform.executable,
+ "Platform.script": Platform.script,
+ "Platform.packageRoot": Platform.packageRoot,
+ "Platform.executableArguments": Platform.executableArguments
+ });
}
testIsolate() {
@@ -85,13 +86,12 @@ testIsolate() {
Expect.equals("file", uri.scheme);
Expect.isTrue(uri.path.endsWith('tests/standalone/io/platform_test.dart'));
Expect.equals(Platform.packageRoot, results["Platform.packageRoot"]);
- Expect.listEquals(Platform.executableArguments,
- results["Platform.executableArguments"]);
+ Expect.listEquals(
+ Platform.executableArguments, results["Platform.executableArguments"]);
asyncEnd();
});
}
-
testVersion() {
checkValidVersion(String version) {
RegExp re = new RegExp(r'(\d+)\.(\d+)\.(\d+)(-dev\.([^\.]*)\.([^\.]*))?');

Powered by Google App Engine
This is Rietveld 408576698