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

Unified Diff: third_party/pkg/angular/test/filter/filter_spec.dart

Issue 180873006: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/test/filter/filter_spec.dart
diff --git a/third_party/pkg/angular/test/filter/filter_spec.dart b/third_party/pkg/angular/test/filter/filter_spec.dart
index ca8552e187580b85febcda7f5b09c866defc7b03..df438e7a7e990b9661951a00ca43da85f273c62d 100644
--- a/third_party/pkg/angular/test/filter/filter_spec.dart
+++ b/third_party/pkg/angular/test/filter/filter_spec.dart
@@ -1,27 +1,28 @@
library filter_spec;
-import 'dart:mirrors';
-import 'dart:collection';
import '../_specs.dart';
// Helper to simulate some real objects. Purposefully doesn't implement Map.
class DynamicObject {
- Map<String, dynamic> __map__;
- DynamicObject([Map init]): __map__ = (init == null) ? {} : init;
- toString() => Maps.mapToString(__map__);
+ final Map<Symbol, dynamic> _map = {};
+ DynamicObject([Map init]) {
+ init.forEach((key, value) => _map[new Symbol(key)] = value);
+ }
+ toString() => "$_map";
operator ==(DynamicObject other) {
- return (__map__.length == other.__map__.length &&
- __map__.keys.toSet().difference(other.__map__.keys.toSet()).length == 0 &&
- __map__.keys.every((key) => __map__[key] == other.__map__[key]));
+ return (_map.length == other._map.length &&
+ _map.keys.toSet().difference(other._map.keys.toSet()).length == 0 &&
+ _map.keys.every((key) => _map[key] == other._map[key]));
}
+ int get hashCode => 0;
noSuchMethod(Invocation invocation) {
- String name = MirrorSystem.getName(invocation.memberName);
+ Symbol name = invocation.memberName;
if (invocation.isGetter) {
- return __map__[name];
+ return _map[name];
} else if (invocation.isSetter) {
- return __map__[name.substring(0, name.length - 1)] = invocation.positionalArguments[0];
+ return _map[name] = invocation.positionalArguments[0];
} else if (invocation.isMethod) {
- return (reflect(__map__[name]) as ClosureMirror).apply(
+ return Function.apply(_map[name],
invocation.positionalArguments, invocation.namedArguments);
} else {
throw "DynamicObject: Unexpected invocation.";
« no previous file with comments | « third_party/pkg/angular/test/filter/date_spec.dart ('k') | third_party/pkg/angular/test/filter/json_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698