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

Side by Side Diff: third_party/pkg/angular/test/core/registry_spec.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library registry_spec; 1 library registry_spec;
2 2
3 import '../_specs.dart'; 3 import '../_specs.dart';
4 4
5 main() => describe('RegistryMap', () { 5 main() => describe('RegistryMap', () {
6 it('should throw error on identical keys', () { 6 it('should allow for multiple registry keys to be added', () {
7 var module = new Module() 7 var module = new Module()
8 ..type(MyMap) 8 ..type(MyMap)
9 ..type(MetadataExtractor) 9 ..type(MetadataExtractor)
10 ..type(A1) 10 ..type(A1)
11 ..type(A2); 11 ..type(A2);
12 12
13 var injector = new DynamicInjector(modules: [module]); 13 var injector = new DynamicInjector(modules: [module]);
14 expect(() { 14 expect(() {
15 injector.get(MyMap); 15 injector.get(MyMap);
16 }).toThrow("Duplicate annotation found: MyAnnotation: A. Exisitng:"); 16 }).not.toThrow();
17 }); 17 });
18 18
19 it('should iterate over all types', () { 19 it('should iterate over all types', () {
20 var module = new Module() 20 var module = new Module()
21 ..type(MyMap) 21 ..type(MyMap)
22 ..type(MetadataExtractor) 22 ..type(MetadataExtractor)
23 ..type(A1); 23 ..type(A1);
24 24
25 var injector = new DynamicInjector(modules: [module]); 25 var injector = new DynamicInjector(modules: [module]);
26 var keys = []; 26 var keys = [];
(...skipping 16 matching lines...) Expand all
43 43
44 const MyAnnotation(String this.name); 44 const MyAnnotation(String this.name);
45 45
46 toString() => name; 46 toString() => name;
47 get hashCode => name.hashCode; 47 get hashCode => name.hashCode;
48 operator==(other) => this.name == other.name; 48 operator==(other) => this.name == other.name;
49 } 49 }
50 50
51 @MyAnnotation('A') @MyAnnotation('B') class A1 {} 51 @MyAnnotation('A') @MyAnnotation('B') class A1 {}
52 @MyAnnotation('A') class A2 {} 52 @MyAnnotation('A') class A2 {}
OLDNEW
« 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