feat(dart/transform): Dedup getters, setters, & methods

Dedup the getters, setters, and methods generated by the transformer
when compiling a template.

Run `dartformat` over the transform code.
This commit is contained in:
Tim Blasi
2015-04-24 10:28:09 -07:00
parent 867705bd2c
commit 15376a6d24
6 changed files with 61 additions and 7 deletions

View File

@ -56,6 +56,14 @@ void allTests() {
_formatThenExpectEquals(output, expected);
});
it('should not generated duplicate getters/setters', () async {
var inputPath = 'template_compiler/duplicate_files/hello.ng_deps.dart';
var expected = readFile(
'template_compiler/duplicate_files/expected/hello.ng_deps.dart');
var output = await processTemplates(reader, new AssetId('a', inputPath));
_formatThenExpectEquals(output, expected);
});
describe('DirectiveMetadataReader', () {
Future<DirectiveMetadata> readMetadata(inputPath) async {
var ngDeps = await parser.parse(new AssetId('a', inputPath));