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

Unified Diff: third_party/pkg/angular/test/core/registry_spec.dart

Issue 1058283006: Update pubspecs and dependencies to get pkgbuild tests working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/test/core/registry_spec.dart
diff --git a/third_party/pkg/angular/test/core/registry_spec.dart b/third_party/pkg/angular/test/core/registry_spec.dart
deleted file mode 100644
index 532dbf1aeaa4e53f1bdbf8aa72919e0ae472d99f..0000000000000000000000000000000000000000
--- a/third_party/pkg/angular/test/core/registry_spec.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-library registry_spec;
-
-import '../_specs.dart';
-
-main() => describe('RegistryMap', () {
- it('should allow for multiple registry keys to be added', () {
- var module = new Module()
- ..type(MyMap)
- ..type(MetadataExtractor)
- ..type(A1)
- ..type(A2);
-
- var injector = new DynamicInjector(modules: [module]);
- expect(() {
- injector.get(MyMap);
- }).not.toThrow();
- });
-
- it('should iterate over all types', () {
- var module = new Module()
- ..type(MyMap)
- ..type(MetadataExtractor)
- ..type(A1);
-
- var injector = new DynamicInjector(modules: [module]);
- var keys = [];
- var types = [];
- var map = injector.get(MyMap);
- map.forEach((k, t) { keys.add(k); types.add(t); });
- expect(keys).toEqual([new MyAnnotation('A'), new MyAnnotation('B')]);
- expect(types).toEqual([A1, A1]);
- });
-
- it('should safely ignore typedefs', () {
- var module = new Module()
- ..type(MyMap)
- ..type(MetadataExtractor)
- ..value(MyTypedef, (String _) => null);
-
- var injector = new DynamicInjector(modules: [module]);
- expect(() => injector.get(MyMap), isNot(throws));
- });
-});
-
-typedef void MyTypedef(String arg);
-
-class MyMap extends AnnotationMap<MyAnnotation> {
- MyMap(Injector injector, MetadataExtractor metadataExtractor)
- : super(injector, metadataExtractor);
-}
-
-
-class MyAnnotation {
- final String name;
-
- const MyAnnotation(String this.name);
-
- toString() => name;
- get hashCode => name.hashCode;
- operator==(other) => this.name == other.name;
-}
-
-@MyAnnotation('A') @MyAnnotation('B') class A1 {}
-@MyAnnotation('A') class A2 {}
« no previous file with comments | « third_party/pkg/angular/test/core/parser/static_parser_spec.dart ('k') | third_party/pkg/angular/test/core/scope_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698