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

Side by Side Diff: tests/compiler/dart2js_extra/19191_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 // Regression test for http://dartbug.com/19191 5 // Regression test for http://dartbug.com/19191
6 6
7 class A { 7 class A {
8 var method; 8 var method;
9 9
10 noSuchMethod(Invocation invocation) { 10 noSuchMethod(Invocation invocation) {
11 if (invocation.isGetter) { 11 if (invocation.isGetter) {
12 return method; 12 return method;
13 } else if (invocation.isSetter) { 13 } else if (invocation.isSetter) {
14 method = invocation.positionalArguments[0]; 14 method = invocation.positionalArguments[0];
15 return null; 15 return null;
16 } else if (invocation.isMethod) { 16 } else if (invocation.isMethod) {
17 return Function.apply(method, invocation.positionalArguments, 17 return Function.apply(
18 invocation.namedArguments); 18 method, invocation.positionalArguments, invocation.namedArguments);
19 } else { 19 } else {
20 throw new NoSuchMethodError(this, invocation.memberName, 20 throw new NoSuchMethodError(this, invocation.memberName,
21 invocation.positionalArguments, invocation.namedArguments); 21 invocation.positionalArguments, invocation.namedArguments);
22 } 22 }
23 } 23 }
24 24
25 init() { 25 init() {
26 closure_fails = (String str) { 26 closure_fails = (String str) {
27 return str.toUpperCase(); 27 return str.toUpperCase();
28 }; 28 };
29 } 29 }
30 30
31 run() { 31 run() {
32 print(closure_fails("Hello World")); 32 print(closure_fails("Hello World"));
33 } 33 }
34 } 34 }
35 35
36 void main() { 36 void main() {
37 var a = new A(); 37 var a = new A();
38 a.init(); 38 a.init();
39 a.run(); 39 a.run();
40 } 40 }
41
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/18383_test.dart ('k') | tests/compiler/dart2js_extra/21166_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698