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

Side by Side Diff: dart/tests/language/super_getter_setter_test.dart

Issue 14049009: Rename Invocation to InvocationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 A { 7 class A {
8 var missingSetterField; 8 var missingSetterField;
9 var missingGetterField; 9 var missingGetterField;
10 var getterInSuperClassField; 10 var getterInSuperClassField;
(...skipping 12 matching lines...) Expand all
23 23
24 set missingGetter(a) { missingGetterField = a; } 24 set missingGetter(a) { missingGetterField = a; }
25 set getterInSuperClass(a) { getterInSuperClassField = a; } 25 set getterInSuperClass(a) { getterInSuperClassField = a; }
26 26
27 get getterSetter => getterSetterField; 27 get getterSetter => getterSetterField;
28 set getterSetter(a) { getterSetterField = a; } 28 set getterSetter(a) { getterSetterField = a; }
29 29
30 operator[](index) => indexField[index]; 30 operator[](index) => indexField[index];
31 operator[]=(index, value) { indexField[index] = value; } 31 operator[]=(index, value) { indexField[index] = value; }
32 32
33 noSuchMethod(InvocationMirror im) { 33 noSuchMethod(Invocation im) {
34 if (im.memberName.startsWith('missingSetter')) { 34 if (im.memberName.startsWith('missingSetter')) {
35 Expect.isTrue(im.isSetter); 35 Expect.isTrue(im.isSetter);
36 missingSetterField = im.positionalArguments[0]; 36 missingSetterField = im.positionalArguments[0];
37 } else if (im.memberName.startsWith('missingGetter')) { 37 } else if (im.memberName.startsWith('missingGetter')) {
38 Expect.isTrue(im.isGetter); 38 Expect.isTrue(im.isGetter);
39 return missingGetterField; 39 return missingGetterField;
40 } else if (im.memberName.startsWith('missingAll') && im.isGetter) { 40 } else if (im.memberName.startsWith('missingAll') && im.isGetter) {
41 return missingAllField; 41 return missingAllField;
42 } else if (im.memberName.startsWith('missingAll') && im.isSetter) { 42 } else if (im.memberName.startsWith('missingAll') && im.isSetter) {
43 missingAllField = im.positionalArguments[0]; 43 missingAllField = im.positionalArguments[0];
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 Expect.equals(3, super[0] += 1); 96 Expect.equals(3, super[0] += 1);
97 Expect.equals(3, super[0]); 97 Expect.equals(3, super[0]);
98 Expect.equals(3, super[0]++); 98 Expect.equals(3, super[0]++);
99 Expect.equals(4, super[0]); 99 Expect.equals(4, super[0]);
100 } 100 }
101 } 101 }
102 102
103 main() { 103 main() {
104 new C().test(); 104 new C().test();
105 } 105 }
OLDNEW
« no previous file with comments | « dart/tests/language/super_call4_test.dart ('k') | dart/tests/language/super_operator_index5_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698