OLD | NEW |
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 /// Tests wrapper utilities. | 5 /// Tests wrapper utilities. |
6 | 6 |
7 import "dart:collection"; | 7 import "dart:collection"; |
8 import "package:collection/collection.dart"; | 8 import "package:collection/collection.dart"; |
9 import "package:test/test.dart"; | 9 import "package:test/test.dart"; |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 class SyntheticInvocation implements Invocation { | 53 class SyntheticInvocation implements Invocation { |
54 static const int METHOD = 0x00; | 54 static const int METHOD = 0x00; |
55 static const int GETTER = 0x01; | 55 static const int GETTER = 0x01; |
56 static const int SETTER = 0x02; | 56 static const int SETTER = 0x02; |
57 final Symbol memberName; | 57 final Symbol memberName; |
58 final List positionalArguments; | 58 final List positionalArguments; |
59 final Map<Symbol, dynamic> namedArguments; | 59 final Map<Symbol, dynamic> namedArguments; |
60 final int _type; | 60 final int _type; |
61 const SyntheticInvocation(this.memberName, this.positionalArguments, | 61 const SyntheticInvocation(this.memberName, this.positionalArguments, |
62 this.namedArguments, this._type); | 62 this.namedArguments, this._type); |
| 63 |
| 64 List<Type> get typeArguments => const <Type>[]; |
| 65 |
63 bool get isMethod => _type == METHOD; | 66 bool get isMethod => _type == METHOD; |
64 | 67 |
65 bool get isGetter => _type == GETTER; | 68 bool get isGetter => _type == GETTER; |
66 | 69 |
67 bool get isSetter => _type == SETTER; | 70 bool get isSetter => _type == SETTER; |
68 | 71 |
69 bool get isAccessor => isGetter || isSetter; | 72 bool get isAccessor => isGetter || isSetter; |
70 } | 73 } |
71 | 74 |
72 // Parameterization of noSuchMethod. | 75 // Parameterization of noSuchMethod. |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 | 655 |
653 test(".retainWhere", () { | 656 test(".retainWhere", () { |
654 map["f"] = "foo"; | 657 map["f"] = "foo"; |
655 map["b"] = "bar"; | 658 map["b"] = "bar"; |
656 map["q"] = "qoo"; | 659 map["q"] = "qoo"; |
657 set.retainWhere((element) => element.endsWith("o")); | 660 set.retainWhere((element) => element.endsWith("o")); |
658 expect(map, equals({"f": "foo", "q": "qoo"})); | 661 expect(map, equals({"f": "foo", "q": "qoo"})); |
659 }); | 662 }); |
660 }); | 663 }); |
661 } | 664 } |
OLD | NEW |