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

Side by Side Diff: tests/compiler/dart2js/sourcemaps/invokes_test_file.dart

Issue 1934883002: Refactor unittests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 // Test file for testing source mappings of invocations.
6
7 var counter = 0;
8
9 main(args) {
10 counter++;
11 invokes(args);
12 return counter;
13 }
14
15 invokes(parameter) {
16 counter++;
17 toplevelFunction();
18 toplevelField();
19 toplevelFinalField();
20 toplevelConstField();
21 toplevelGetter();
22 C.staticFunction();
23 C.staticField();
24 C.staticFinalField();
25 C.staticConstField();
26 C.staticGetter();
27
28 var localVariable = () {
29 counter++;
30 };
31 localFunction() {
32 counter++;
33 }
34
35 parameter();
36 localVariable();
37 localFunction();
38 (parameter)();
39
40 parameter.dynamicInvoke();
41 new C(parameter).instanceInvokes();
42 }
43
44 toplevelFunction() {
45 counter++;
46 }
47
48 var toplevelField = () {
49 counter++;
50 };
51
52 final toplevelFinalField = toplevelFunction;
53
54 const toplevelConstField = toplevelFunction;
55
56 get toplevelGetter => () {
57 counter++;
58 };
59
60 typedef F();
61
62 class B {
63 B(parameter);
64
65 superMethod() {
66 counter++;
67 }
68
69 var superField = () {
70 counter++;
71 };
72
73 get superGetter => () {
74 counter++;
75 };
76
77 }
78
79 class C<T> extends B {
80 C(parameter) : super(parameter);
81
82 static staticFunction() {
83 counter++;
84 }
85
86 static var staticField = () {
87 counter++;
88 };
89
90 static final staticFinalField = staticFunction;
91
92 static const staticConstField = staticFunction;
93
94 static get staticGetter => () {
95 counter++;
96 };
97
98 instanceMethod() {
99 counter++;
100 }
101
102 var instanceField = () {
103 counter++;
104 };
105
106 get instanceGetter => () {
107 counter++;
108 };
109
110 instanceInvokes() {
111 instanceMethod();
112 this.instanceMethod();
113 instanceField();
114 this.instanceField();
115 instanceGetter();
116 this.instanceGetter();
117
118 super.superMethod();
119 super.superField();
120 super.superGetter();
121
122 C();
123 dynamic();
124 F();
125 T();
126 }
127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698