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

Unified Diff: tests/language_strong/rewrite_if_empty_then_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/language_strong/rewrite_if_empty_then_test.dart
diff --git a/tests/language_strong/rewrite_if_empty_then_test.dart b/tests/language_strong/rewrite_if_empty_then_test.dart
index 79ff882e4651facfc76658814a9fc32d0e3857f9..908b49685bb54fc35b4117a4b646615f313df8dc 100644
--- a/tests/language_strong/rewrite_if_empty_then_test.dart
+++ b/tests/language_strong/rewrite_if_empty_then_test.dart
@@ -7,41 +7,44 @@ import "package:expect/expect.dart";
var global = 0;
effect() {
- global = 1;
+ global = 1;
+}
+
+baz(b) {
+ return b;
}
-baz(b) { return b; }
foo(b) {
- if (b) {
- // do nothing
- } else {
- effect();
- }
- return baz(b);
+ if (b) {
+ // do nothing
+ } else {
+ effect();
+ }
+ return baz(b);
}
foo2(b) {
- if (b) {
- // do nothing (but implicit return may get inlined up here)
- } else {
- effect();
- }
+ if (b) {
+ // do nothing (but implicit return may get inlined up here)
+ } else {
+ effect();
+ }
}
main() {
- global = 0;
- Expect.equals(true, foo(true));
- Expect.equals(0, global);
+ global = 0;
+ Expect.equals(true, foo(true));
+ Expect.equals(0, global);
- global = 0;
- Expect.equals(false, foo(false));
- Expect.equals(1, global);
+ global = 0;
+ Expect.equals(false, foo(false));
+ Expect.equals(1, global);
- global = 0;
- foo2(true);
- Expect.equals(0, global);
+ global = 0;
+ foo2(true);
+ Expect.equals(0, global);
- global = 0;
- foo2(false);
- Expect.equals(1, global);
+ global = 0;
+ foo2(false);
+ Expect.equals(1, global);
}

Powered by Google App Engine
This is Rietveld 408576698