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

Unified Diff: test/codegen/expect/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/temps.js ('k') | test/codegen/expect/unittest/unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/unittest.js
diff --git a/test/codegen/expect/unittest.js b/test/codegen/expect/unittest.js
index 2018b5bad47b455c8c341a3c080afd7d498666b3..c8c092ba356586f3d132756bf7a4574d9b58500c 100644
--- a/test/codegen/expect/unittest.js
+++ b/test/codegen/expect/unittest.js
@@ -54,8 +54,7 @@ dart_library.library('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', 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', 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/temps.js ('k') | test/codegen/expect/unittest/unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698