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

Side by Side Diff: tests/compiler/dart2js_extra/no_such_method_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 NoSuchMethodInfo { 7 class NoSuchMethodInfo {
8 Object receiver; 8 Object receiver;
9 String name; 9 String name;
10 List args; 10 List args;
11 NoSuchMethodInfo(Object r, String m, List a) 11 NoSuchMethodInfo(Object r, String m, List a)
12 : receiver = r, name = m, args = a; 12 : receiver = r,
13 name = m,
14 args = a;
13 } 15 }
14 16
15 class A { 17 class A {
16 noSuchMethod(Invocation invocation) { 18 noSuchMethod(Invocation invocation) {
17 topLevelInfo = new NoSuchMethodInfo(this, invocation.memberName, 19 topLevelInfo = new NoSuchMethodInfo(
18 invocation.positionalArguments); 20 this, invocation.memberName, invocation.positionalArguments);
19 return topLevelInfo; 21 return topLevelInfo;
20 } 22 }
21 23
22 foo(a, b, c) { 24 foo(a, b, c) {
23 Expect.fail('Should never enter here'); 25 Expect.fail('Should never enter here');
24 } 26 }
25 } 27 }
26 28
27 // Used for the setter case. 29 // Used for the setter case.
28 NoSuchMethodInfo topLevelInfo; 30 NoSuchMethodInfo topLevelInfo;
(...skipping 16 matching lines...) Expand all
45 Expect.isTrue(info.args.length == 0); 47 Expect.isTrue(info.args.length == 0);
46 Expect.isTrue(identical(info.receiver, a)); 48 Expect.isTrue(identical(info.receiver, a));
47 49
48 a.bar = 2; 50 a.bar = 2;
49 info = topLevelInfo; 51 info = topLevelInfo;
50 Expect.equals('bar', info.name); 52 Expect.equals('bar', info.name);
51 Expect.isTrue(info.args.length == 1); 53 Expect.isTrue(info.args.length == 1);
52 Expect.isTrue(info.args[0] == 2); 54 Expect.isTrue(info.args[0] == 2);
53 Expect.isTrue(identical(info.receiver, a)); 55 Expect.isTrue(identical(info.receiver, a));
54 } 56 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/named_parameter_for_static_test.dart ('k') | tests/compiler/dart2js_extra/null_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698