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

Side by Side Diff: third_party/pkg/angular/test/io/source_metadata_extractor_spec.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://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 ng.tool.source_metadata_extractor_spec; 1 library ng.tool.source_metadata_extractor_spec;
2 2
3 import 'package:angular/tools/common.dart'; 3 import 'package:angular/tools/common.dart';
4 import 'package:angular/tools/source_crawler_impl.dart'; 4 import 'package:angular/tools/source_crawler_impl.dart';
5 import 'package:angular/tools/source_metadata_extractor.dart'; 5 import 'package:angular/tools/source_metadata_extractor.dart';
6 import '../jasmine_syntax.dart'; 6 import '../jasmine_syntax.dart';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 8
9 main() => describe('source_metadata_extractor', () { 9 main() => describe('source_metadata_extarctor', () {
10 it('should extract all attribute mappings including annotations', () { 10 it('should extract all attribute mappings including annotations', () {
11 var sourceCrawler = new SourceCrawlerImpl(['packages/']); 11 var sourceCrawler = new SourceCrawlerImpl(['packages/']);
12 var sourceMetadataExtractor = new SourceMetadataExtractor(); 12 var sourceMetadataExtractor = new SourceMetadataExtractor(sourceCrawler);
13 List<DirectiveInfo> directives = 13 List<DirectiveInfo> directives =
14 sourceMetadataExtractor 14 sourceMetadataExtractor
15 .gatherDirectiveInfo('test/io/test_files/main.dart', sourceCrawler); 15 .gatherDirectiveInfo('test/io/test_files/main.dart');
16 16
17 expect(directives, hasLength(2)); 17 expect(directives, hasLength(2));
18 18
19 DirectiveInfo info = directives.elementAt(1); 19 DirectiveInfo info = directives.elementAt(1);
20 expect(info.expressionAttrs, unorderedEquals(['expr', 'another-expression', 20 expect(info.expressionAttrs, unorderedEquals(['expr', 'another-expression',
21 'callback', 'two-way-stuff', 'exported-attr'])); 21 'callback', 'two-way-stuff', 'exported-attr']));
22 expect(info.expressions, unorderedEquals(['attr', 'expr', 22 expect(info.expressions, unorderedEquals(['attr', 'expr',
23 'anotherExpression', 'callback', 'twoWayStuff', 23 'anotherExpression', 'callback', 'twoWayStuff',
24 'exported + expression'])); 24 'exported + expression']));
25 }); 25 });
26 }); 26 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698