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

Side by Side Diff: tests/compiler/dart2js/field_update_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
8 8
9 // Test for emitting JavaScript pre- and post-increment and assignment ops. 9 // Test for emitting JavaScript pre- and post-increment and assignment ops.
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 var a = 42; 73 var a = 42;
74 int foo() { var r = a; a = a * 2; return a; } // this.a *= 2 74 int foo() { var r = a; a = a * 2; return a; } // this.a *= 2
75 } 75 }
76 76
77 void main() { 77 void main() {
78 var a = new A(); 78 var a = new A();
79 print(a.foo()); 79 print(a.foo());
80 } 80 }
81 """; 81 """;
82 82
83
84 main() { 83 main() {
85 test(String code, Function f) { 84 test(String code, Function f) {
86 asyncTest(() => compileAll(code, disableInlining: true).then((generated) { 85 asyncTest(() => compileAll(code, disableInlining: true).then((generated) {
87 Expect.isTrue(f(generated)); 86 Expect.isTrue(f(generated));
88 })); 87 }));
89 } 88 }
90 89
91 test(TEST_1, (generated) => generated.contains(r'return this.a++;')); 90 test(TEST_1, (generated) => generated.contains(r'return this.a++;'));
92 test(TEST_2, (generated) => generated.contains(r'return ++this.a;')); 91 test(TEST_2, (generated) => generated.contains(r'return ++this.a;'));
93 test(TEST_3, (generated) => generated.contains(r'return this.a--;')); 92 test(TEST_3, (generated) => generated.contains(r'return this.a--;'));
94 test(TEST_4, (generated) => generated.contains(r'return --this.a;')); 93 test(TEST_4, (generated) => generated.contains(r'return --this.a;'));
95 test(TEST_5, (generated) => generated.contains(r' this.a -= 2;')); 94 test(TEST_5, (generated) => generated.contains(r' this.a -= 2;'));
96 test(TEST_6, (generated) => generated.contains(r' this.a *= 2;')); 95 test(TEST_6, (generated) => generated.contains(r' this.a *= 2;'));
97 } 96 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/field_type_simple_inferer_test.dart ('k') | tests/compiler/dart2js/find_my_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698