From a8f45a6b4350f95b43115c257d4ed8eb59bfddff Mon Sep 17 00:00:00 2001 From: Tim Blasi Date: Thu, 5 Nov 2015 11:29:30 -0800 Subject: [PATCH] SQUASH ME! Unit test updates. Kept separate since these are mostly mechanical changes. --- .../directive_metadata_linker/all_tests.dart | 12 +++++------- .../deferred_files/expected/bar.ng_deps.dart | 2 +- .../directive_chain_files/expected/bar.ng_deps.dart | 4 ++-- .../directive_dep_files/expected/bar.ng_deps.dart | 4 ++-- .../empty_ng_deps_files/expected/foo.ng_deps.dart | 4 ++-- .../event_getter_files/expected/bar.ng_deps.dart | 2 +- .../list_of_types_files/expected/bar.ng_deps.dart | 2 +- .../expected/bar.ng_deps.dart | 2 +- .../expected/bar.ng_deps.dart | 2 +- .../expected/bar.ng_deps.dart | 2 +- .../expected/bar.ng_deps.dart | 2 +- .../expected/index.ng_deps.dart | 4 ++-- .../synthetic_ctor_files/expected/bar.ng_deps.dart | 2 +- .../two_annotations_files/expected/bar.ng_deps.dart | 2 +- .../two_deps_files/expected/bar.ng_deps.dart | 2 +- 15 files changed, 23 insertions(+), 25 deletions(-) diff --git a/modules_dart/transform/test/transform/directive_metadata_linker/all_tests.dart b/modules_dart/transform/test/transform/directive_metadata_linker/all_tests.dart index e4d05d8c09..4b9b03a58c 100644 --- a/modules_dart/transform/test/transform/directive_metadata_linker/all_tests.dart +++ b/modules_dart/transform/test/transform/directive_metadata_linker/all_tests.dart @@ -129,10 +129,9 @@ void allTests() { var linked = (await _testLink(reader, fooAssetId)).ngDeps; expect(linked).toBeNotNull(); - var linkedImport = - linked.imports.firstWhere((i) => i.uri.endsWith('bar.ng_deps.dart')); + var linkedImport = linked.depImports + .firstWhere((i) => i.uri.endsWith('bar.ng_deps.dart')); expect(linkedImport).toBeNotNull(); - expect(linkedImport.isNgDeps).toBeTrue(); expect(linkedImport.prefix.startsWith('i')).toBeTrue(); }); @@ -145,10 +144,9 @@ void allTests() { var linked = (await _testLink(reader, fooAssetId)).ngDeps; expect(linked).toBeNotNull(); - var linkedImport = - linked.imports.firstWhere((i) => i.uri.endsWith('bar.ng_deps.dart')); + var linkedImport = linked.depImports + .firstWhere((i) => i.uri.endsWith('bar.ng_deps.dart')); expect(linkedImport).toBeNotNull(); - expect(linkedImport.isNgDeps).toBeTrue(); expect(linkedImport.prefix.startsWith('i')).toBeTrue(); }); @@ -164,7 +162,7 @@ void allTests() { var linked = (await _testLink(reader, fooAssetId)).ngDeps; expect(linked).toBeNotNull(); - var linkedImport = linked.imports.firstWhere( + var linkedImport = linked.depImports.firstWhere( (i) => i.uri.endsWith('bar.ng_deps.dart'), orElse: () => null); expect(linkedImport).toBeNull(); diff --git a/modules_dart/transform/test/transform/integration/deferred_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/deferred_files/expected/bar.ng_deps.dart index 9d0372cb11..fb5036acfd 100644 --- a/modules_dart/transform/test/transform/integration/deferred_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/deferred_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/directive_chain_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/directive_chain_files/expected/bar.ng_deps.dart index 9ecd12cdaf..79685a30cb 100644 --- a/modules_dart/transform/test/transform/integration/directive_chain_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/directive_chain_files/expected/bar.ng_deps.dart @@ -3,10 +3,10 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'baz.dart'; -import 'baz.ng_deps.dart' as i1; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; +import 'baz.ng_deps.dart' as i1; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/directive_dep_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/directive_dep_files/expected/bar.ng_deps.dart index 869332d645..a4042fda62 100644 --- a/modules_dart/transform/test/transform/integration/directive_dep_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/directive_dep_files/expected/bar.ng_deps.dart @@ -3,10 +3,10 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'foo.dart' as prefix; -import 'foo.ng_deps.dart' as i1; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; +import 'foo.ng_deps.dart' as i1; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/empty_ng_deps_files/expected/foo.ng_deps.dart b/modules_dart/transform/test/transform/integration/empty_ng_deps_files/expected/foo.ng_deps.dart index 812ca1d7e0..3dd525cb7f 100644 --- a/modules_dart/transform/test/transform/integration/empty_ng_deps_files/expected/foo.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/empty_ng_deps_files/expected/foo.ng_deps.dart @@ -3,10 +3,10 @@ library bar.ng_deps.dart; import 'foo.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.dart'; -import 'bar.ng_deps.dart' as i1; import 'foo.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; +import 'bar.ng_deps.dart' as i1; export 'foo.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/event_getter_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/event_getter_files/expected/bar.ng_deps.dart index f2cbc3fde6..6e977774b1 100644 --- a/modules_dart/transform/test/transform/integration/event_getter_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/event_getter_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/list_of_types_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/list_of_types_files/expected/bar.ng_deps.dart index 005b4a7398..e218e06a49 100644 --- a/modules_dart/transform/test/transform/integration/list_of_types_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/list_of_types_files/expected/bar.ng_deps.dart @@ -3,9 +3,9 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'foo.dart'; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/override_annotation_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/override_annotation_files/expected/bar.ng_deps.dart index 3128c4b81c..53a0ddc53b 100644 --- a/modules_dart/transform/test/transform/integration/override_annotation_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/override_annotation_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/queries_class_annotation_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/queries_class_annotation_files/expected/bar.ng_deps.dart index b16d6c2cc3..95e6bb1240 100644 --- a/modules_dart/transform/test/transform/integration/queries_class_annotation_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/queries_class_annotation_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/queries_prop_annotation_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/queries_prop_annotation_files/expected/bar.ng_deps.dart index 1fcdbe6d16..13c6389724 100644 --- a/modules_dart/transform/test/transform/integration/queries_prop_annotation_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/queries_prop_annotation_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/bar.ng_deps.dart index e7fc99c12b..6db43dcc9e 100644 --- a/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/index.ng_deps.dart b/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/index.ng_deps.dart index 0db97e01a1..76d49a6406 100644 --- a/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/index.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/simple_annotation_files/expected/index.ng_deps.dart @@ -5,12 +5,12 @@ import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/bootstrap_static.dart'; import 'package:angular2/src/core/reflection/reflection.dart'; import 'bar.dart'; -import 'bar.ng_deps.dart' as i2; +import 'bar.ng_deps.dart' as i0; export 'index.dart'; var _visited = false; void initReflector() { if (_visited) return; _visited = true; - i2.initReflector(); + i0.initReflector(); } diff --git a/modules_dart/transform/test/transform/integration/synthetic_ctor_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/synthetic_ctor_files/expected/bar.ng_deps.dart index 9d0372cb11..fb5036acfd 100644 --- a/modules_dart/transform/test/transform/integration/synthetic_ctor_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/synthetic_ctor_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/two_annotations_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/two_annotations_files/expected/bar.ng_deps.dart index 476f499d8c..35b3e520e8 100644 --- a/modules_dart/transform/test/transform/integration/two_annotations_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/two_annotations_files/expected/bar.ng_deps.dart @@ -3,8 +3,8 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false; diff --git a/modules_dart/transform/test/transform/integration/two_deps_files/expected/bar.ng_deps.dart b/modules_dart/transform/test/transform/integration/two_deps_files/expected/bar.ng_deps.dart index 000d99a98b..e3242233e7 100644 --- a/modules_dart/transform/test/transform/integration/two_deps_files/expected/bar.ng_deps.dart +++ b/modules_dart/transform/test/transform/integration/two_deps_files/expected/bar.ng_deps.dart @@ -3,9 +3,9 @@ library bar.ng_deps.dart; import 'bar.dart'; import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef; import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; import 'foo.dart' as prefix; import 'bar.template.dart' as _templates; +import 'package:angular2/src/core/metadata.ng_deps.dart' as i0; export 'bar.dart'; var _visited = false;