style(dart/transform): Rename .ngDeps.dart => .ng_deps.dart
Update to conform with file naming conventions. Closes #975
This commit is contained in:
@@ -19,9 +19,9 @@ void allTests() {
|
||||
|
||||
test('should generate a setter for a `bind` property in an annotation.',
|
||||
() async {
|
||||
var inputPath = 'bind_generator/basic_bind_files/bar.ngDeps.dart';
|
||||
var inputPath = 'bind_generator/basic_bind_files/bar.ng_deps.dart';
|
||||
var expected = formatter.format(
|
||||
readFile('bind_generator/basic_bind_files/expected/bar.ngDeps.dart'));
|
||||
readFile('bind_generator/basic_bind_files/expected/bar.ng_deps.dart'));
|
||||
|
||||
var output = formatter
|
||||
.format(await createNgSetters(reader, new AssetId('a', inputPath)));
|
||||
@@ -30,9 +30,10 @@ void allTests() {
|
||||
|
||||
test('should generate a single setter when multiple annotations bind to the '
|
||||
'same property.', () async {
|
||||
var inputPath = 'bind_generator/duplicate_bind_name_files/soup.ngDeps.dart';
|
||||
var inputPath =
|
||||
'bind_generator/duplicate_bind_name_files/soup.ng_deps.dart';
|
||||
var expected = formatter.format(readFile(
|
||||
'bind_generator/duplicate_bind_name_files/expected/soup.ngDeps.dart'));
|
||||
'bind_generator/duplicate_bind_name_files/expected/soup.ng_deps.dart'));
|
||||
|
||||
var output = formatter
|
||||
.format(await createNgSetters(reader, new AssetId('a', inputPath)));
|
||||
|
||||
@@ -17,7 +17,7 @@ var formatter = new DartFormatter();
|
||||
void allTests() {
|
||||
test('should preserve parameter annotations as const instances.', () {
|
||||
var inputPath = 'parameter_metadata/soup.dart';
|
||||
var expected = _readFile('parameter_metadata/expected/soup.ngDeps.dart');
|
||||
var expected = _readFile('parameter_metadata/expected/soup.ng_deps.dart');
|
||||
var output =
|
||||
formatter.format(createNgDeps(_readFile(inputPath), inputPath));
|
||||
expect(output, equals(expected));
|
||||
|
||||
@@ -47,10 +47,10 @@ void allTests() {
|
||||
'a|web/bar.dart': 'simple_annotation_files/bar.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ngDeps.dart':
|
||||
'simple_annotation_files/expected/bar.ngDeps.dart',
|
||||
'a|web/index.ngDeps.dart':
|
||||
'simple_annotation_files/expected/index.ngDeps.dart'
|
||||
'a|web/bar.ng_deps.dart':
|
||||
'simple_annotation_files/expected/bar.ng_deps.dart',
|
||||
'a|web/index.ng_deps.dart':
|
||||
'simple_annotation_files/expected/index.ng_deps.dart'
|
||||
}),
|
||||
new IntegrationTestConfig(
|
||||
'should generate proper code for a Component using a selector defined '
|
||||
@@ -61,7 +61,7 @@ void allTests() {
|
||||
'a|web/bar.dart': 'two_deps_files/bar.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ngDeps.dart': 'two_deps_files/expected/bar.ngDeps.dart'
|
||||
'a|web/bar.ng_deps.dart': 'two_deps_files/expected/bar.ng_deps.dart'
|
||||
}),
|
||||
new IntegrationTestConfig(
|
||||
'should generate proper code for a Component declaring a '
|
||||
@@ -72,7 +72,7 @@ void allTests() {
|
||||
'a|web/bar.dart': 'list_of_types_files/bar.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ngDeps.dart': 'list_of_types_files/expected/bar.ngDeps.dart'
|
||||
'a|web/bar.ng_deps.dart': 'list_of_types_files/expected/bar.ng_deps.dart'
|
||||
}),
|
||||
new IntegrationTestConfig(
|
||||
'should generate a factory for a class with no declared ctor.',
|
||||
@@ -81,7 +81,7 @@ void allTests() {
|
||||
'a|web/bar.dart': 'synthetic_ctor_files/bar.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ngDeps.dart': 'synthetic_ctor_files/expected/bar.ngDeps.dart'
|
||||
'a|web/bar.ng_deps.dart': 'synthetic_ctor_files/expected/bar.ng_deps.dart'
|
||||
}),
|
||||
new IntegrationTestConfig('should preserve multiple annotations.',
|
||||
inputs: {
|
||||
@@ -91,7 +91,8 @@ void allTests() {
|
||||
'../../../lib/src/core/annotations/template.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ngDeps.dart': 'two_annotations_files/expected/bar.ngDeps.dart'
|
||||
'a|web/bar.ng_deps.dart':
|
||||
'two_annotations_files/expected/bar.ng_deps.dart'
|
||||
}),
|
||||
new IntegrationTestConfig(
|
||||
'should ensure that dependencies are property chained.',
|
||||
@@ -101,8 +102,8 @@ void allTests() {
|
||||
'a|web/bar.dart': 'chained_deps_files/bar.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ngDeps.dart': 'chained_deps_files/expected/bar.ngDeps.dart',
|
||||
'a|web/foo.ngDeps.dart': 'chained_deps_files/expected/foo.ngDeps.dart'
|
||||
'a|web/bar.ng_deps.dart': 'chained_deps_files/expected/bar.ng_deps.dart',
|
||||
'a|web/foo.ng_deps.dart': 'chained_deps_files/expected/foo.ng_deps.dart'
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ library bar;
|
||||
import 'bar.dart';
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
import 'foo.dart' as dep;
|
||||
import 'foo.ngDeps.dart' as i0;
|
||||
import 'foo.ng_deps.dart' as i0;
|
||||
|
||||
bool _visited = false;
|
||||
void setupReflection(reflector) {
|
||||
+1
-1
@@ -3,7 +3,7 @@ library web_foo;
|
||||
import 'package:angular2/src/core/application.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
import 'a:web/bar.ngDeps.dart' as i0;
|
||||
import 'a:web/bar.ng_deps.dart' as i0;
|
||||
|
||||
bool _visited = false;
|
||||
void setupReflection(reflector) {
|
||||
+1
-1
@@ -5,7 +5,7 @@ import 'package:angular2/src/core/application.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
import 'bar.ngDeps.dart' as i0;
|
||||
import 'bar.ng_deps.dart' as i0;
|
||||
|
||||
bool _visited = false;
|
||||
void setupReflection(reflector) {
|
||||
@@ -9,7 +9,7 @@ import 'reflection_remover_files/expected/index.dart' as expected;
|
||||
import '../common/read_file.dart';
|
||||
|
||||
void allTests() {
|
||||
var codegen = new Codegen('web/index.dart', 'web/index.ngDeps.dart');
|
||||
var codegen = new Codegen('web/index.dart', 'web/index.ng_deps.dart');
|
||||
|
||||
test('should remove uses of mirrors & insert calls to generated code.', () {
|
||||
var code =
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ library web_foo;
|
||||
|
||||
import 'package:angular2/src/core/application.dart';
|
||||
import 'package:angular2/src/reflection/reflection.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';import 'index.ngDeps.dart' as ngStaticInit;
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';import 'index.ng_deps.dart' as ngStaticInit;
|
||||
|
||||
void main() {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();ngStaticInit.setupReflection(reflector);
|
||||
|
||||
Reference in New Issue
Block a user