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

Side by Side Diff: tests/compiler/dart2js_extra/fields_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 6
7 class A { 7 class A {
8 A() { 8 A() {}
9 }
10 int x; 9 int x;
11 10
12 foo() { 11 foo() {
13 x = 42; 12 x = 42;
14 Expect.equals(42, x); 13 Expect.equals(42, x);
15 x = 0; 14 x = 0;
16 Expect.equals(0, x); 15 Expect.equals(0, x);
17 } 16 }
18 } 17 }
19 18
20 class B extends A { 19 class B extends A {}
21 }
22 20
23 main() { 21 main() {
24 A a = new A(); 22 A a = new A();
25 a.foo(); 23 a.foo();
26 Expect.equals(0, a.x); 24 Expect.equals(0, a.x);
27 a.x = 4; 25 a.x = 4;
28 Expect.equals(4, a.x); 26 Expect.equals(4, a.x);
29 a.x += 1; 27 a.x += 1;
30 Expect.equals(5, a.x); 28 Expect.equals(5, a.x);
31 29
32 B b = new B(); 30 B b = new B();
33 b.foo(); 31 b.foo();
34 Expect.equals(0, b.x); 32 Expect.equals(0, b.x);
35 } 33 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/equals_test.dart ('k') | tests/compiler/dart2js_extra/for_in_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698