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

Side by Side Diff: tests/language/prefix10_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 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 library Prefix10Test.dart; 5 library Prefix10Test.dart;
6
6 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
7 import "library10.dart" as lib10; 8 import "library10.dart" as lib10;
8 import "library11.dart" as lib11; 9 import "library11.dart" as lib11;
9 10
10 class Prefix10Test { 11 class Prefix10Test {
11 static Test1() { 12 static Test1() {
12 var result = 0; 13 var result = 0;
13 var obj = new lib10.Library10(1); 14 var obj = new lib10.Library10(1);
14 result = obj.fld; 15 result = obj.fld;
15 Expect.equals(1, result); 16 Expect.equals(1, result);
16 result += obj.func(); 17 result += obj.func();
17 Expect.equals(3, result); 18 Expect.equals(3, result);
18 result += lib10.Library10.static_func(); 19 result += lib10.Library10.static_func();
19 Expect.equals(6, result); 20 Expect.equals(6, result);
20 result += lib10.Library10.static_fld; 21 result += lib10.Library10.static_fld;
21 Expect.equals(10, result); 22 Expect.equals(10, result);
22 } 23 }
24
23 static Test2() { 25 static Test2() {
24 var result = 0; 26 var result = 0;
25 var obj = new lib11.Library11(4); 27 var obj = new lib11.Library11(4);
26 result = obj.fld; 28 result = obj.fld;
27 Expect.equals(4, result); 29 Expect.equals(4, result);
28 result += obj.func(); 30 result += obj.func();
29 Expect.equals(7, result); 31 Expect.equals(7, result);
30 result += lib11.Library11.static_func(); 32 result += lib11.Library11.static_func();
31 Expect.equals(9, result); 33 Expect.equals(9, result);
32 result += lib11.Library11.static_fld; 34 result += lib11.Library11.static_fld;
33 Expect.equals(10, result); 35 Expect.equals(10, result);
34 } 36 }
37
35 static Test3() { 38 static Test3() {
36 Expect.equals(10, lib10.top_level10); 39 Expect.equals(10, lib10.top_level10);
37 Expect.equals(20, lib10.top_level_func10()); 40 Expect.equals(20, lib10.top_level_func10());
38 } 41 }
42
39 static Test4() { 43 static Test4() {
40 Expect.equals(100, lib11.top_level11); 44 Expect.equals(100, lib11.top_level11);
41 Expect.equals(200, lib11.top_level_func11()); 45 Expect.equals(200, lib11.top_level_func11());
42 } 46 }
43 } 47 }
44 48
45 main() { 49 main() {
46 Prefix10Test.Test1(); 50 Prefix10Test.Test1();
47 Prefix10Test.Test2(); 51 Prefix10Test.Test2();
48 Prefix10Test.Test3(); 52 Prefix10Test.Test3();
49 Prefix10Test.Test4(); 53 Prefix10Test.Test4();
50 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698