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

Unified Diff: test/codegen/expect/unittest/unittest.js

Issue 1524843002: JS: Format if statements with no else on a single line (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased Created 5 years 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 | « test/codegen/expect/unittest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/unittest/unittest.js
diff --git a/test/codegen/expect/unittest/unittest.js b/test/codegen/expect/unittest/unittest.js
index 3e7a0f3a5af110a854b2e8813a5460b6887a3fce..770c05d241c91a7b75aff9b6b20dce3d51159b80 100644
--- a/test/codegen/expect/unittest/unittest.js
+++ b/test/codegen/expect/unittest/unittest.js
@@ -54,8 +54,7 @@ dart_library.library('unittest/unittest', null, /* Imports */[
matcher = util.wrapMatcher(matcher);
let matchState = dart.map();
try {
- if (dart.notNull(dart.as(dart.dsend(matcher, 'matches', actual, matchState), core.bool)))
- return;
+ if (dart.notNull(dart.as(dart.dsend(matcher, 'matches', actual, matchState), core.bool))) return;
} catch (e) {
let trace = dart.stackTrace(e);
if (reason == null) {
@@ -63,8 +62,7 @@ dart_library.library('unittest/unittest', null, /* Imports */[
}
}
- if (formatter == null)
- formatter = _defaultFailFormatter;
+ if (formatter == null) formatter = _defaultFailFormatter;
fail(dart.dcall(formatter, actual, matcher, reason, matchState, verbose));
}
dart.fn(expect, dart.void, [dart.dynamic, dart.dynamic], {reason: core.String, verbose: core.bool, formatter: ErrorFormatter});
@@ -81,8 +79,7 @@ dart_library.library('unittest/unittest', null, /* Imports */[
if (dart.notNull(mismatchDescription.length) > 0) {
description.add(` Which: ${mismatchDescription}\n`);
}
- if (reason != null)
- description.add(reason).add('\n');
+ if (reason != null) description.add(reason).add('\n');
return dart.toString(description);
}
dart.fn(_defaultFailFormatter, core.String, [dart.dynamic, interfaces.Matcher, core.String, core.Map, core.bool]);
« no previous file with comments | « test/codegen/expect/unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698