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

Side by Side Diff: pkg/js_ast/test/printer_callback_test.dart

Issue 1219533007: Fix warning in test of js_ast package. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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 // Note: This test relies on LF line endings in the source file. 5 // Note: This test relies on LF line endings in the source file.
6 6
7 // Test that JS printer callbacks occur when expected. 7 // Test that JS printer callbacks occur when expected.
8 8
9 library js_ast.printer.callback_test; 9 library js_ast.printer.callback_test;
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 TestMode.INPUT: "a.#nameTemplate", 164 TestMode.INPUT: "a.#nameTemplate",
165 TestMode.NONE: "a.nameValue", 165 TestMode.NONE: "a.nameValue",
166 TestMode.ENTER: "@0@1a.@2nameValue", 166 TestMode.ENTER: "@0@1a.@2nameValue",
167 TestMode.DELIMITER: "a.nameValue", 167 TestMode.DELIMITER: "a.nameValue",
168 TestMode.EXIT: "a@1.nameValue@2@0", 168 TestMode.EXIT: "a@1.nameValue@2@0",
169 }, const {'nameTemplate': 'nameValue'}), 169 }, const {'nameTemplate': 'nameValue'}),
170 ]; 170 ];
171 171
172 class FixedName extends Name { 172 class FixedName extends Name {
173 final String name; 173 final String name;
174 String get key => name;
174 175
175 FixedName(this.name); 176 FixedName(this.name);
176 177
177 @override 178 @override
178 int compareTo(other) => 0; 179 int compareTo(other) => 0;
179 } 180 }
180 181
181 void check(TestCase testCase) { 182 void check(TestCase testCase) {
182 Map<TestMode, String> map = testCase.data; 183 Map<TestMode, String> map = testCase.data;
183 String code = map[TestMode.INPUT]; 184 String code = map[TestMode.INPUT];
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (offset < text.length) { 247 if (offset < text.length) {
247 sb.write(text.substring(offset)); 248 sb.write(text.substring(offset));
248 } 249 }
249 return sb.toString(); 250 return sb.toString();
250 } 251 }
251 } 252 }
252 253
253 void main() { 254 void main() {
254 DATA.forEach(check); 255 DATA.forEach(check);
255 } 256 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698