2015-04-13 16:54:09 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								library angular2.test.transform.template_compiler.all_tests;
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-14 13:14:45 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'dart:async';
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import 'package:barback/barback.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-25 15:54:12 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:angular2/src/dom/html_adapter.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import 'package:angular2/src/transform/common/asset_reader.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-04-16 08:54:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:angular2/src/transform/common/logging.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import 'package:angular2/src/transform/template_compiler/generator.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import 'package:dart_style/dart_style.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-20 15:25:29 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:guinness/guinness.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import '../common/read_file.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								var formatter = new DartFormatter();
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								AssetReader reader = new TestAssetReader();
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-07 09:03:11 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								main() => allTests();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								void allTests() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Html5LibDomAdapter.makeCurrent();
							 | 
						
					
						
							
								
									
										
										
										
											2015-04-16 08:54:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-14 13:14:45 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  describe('registrations', () {
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    noChangeDetectorTests();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    changeDetectorTests();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								void changeDetectorTests() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Future<String> process(AssetId assetId) => processTemplates(reader, assetId);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  // TODO(tbosch): This is just a temporary test that makes sure that the dart server and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  // dart browser is in sync. Change this to "not contains notifyBinding"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  // when https://github.com/angular/angular/issues/3019 is solved.
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-30 10:59:52 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  it('shouldn always notifyDispatcher for template variables', () async {
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var inputPath = 'template_compiler/ng_for_files/hello.ng_deps.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var output = await (process(new AssetId('a', inputPath)));
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-30 10:59:52 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    expect(output).toContain('notifyDispatcher');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-17 13:21:37 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should include directives mentioned in directive aliases.', () async {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // Input 2 is the same as input1, but contains the directive aliases
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // inlined.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var input1Path =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/directive_aliases_files/hello1.ng_deps.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var input2Path =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/directive_aliases_files/hello2.ng_deps.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // Except for the directive argument in the View annotation, the generated
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // change detectors are identical.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var output1 = (await process(new AssetId('a', input1Path))).replaceFirst(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'directives: const [alias1]', 'directives: const [GoodbyeCmp]');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var output2 = await process(new AssetId('a', input2Path));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output1, output2);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								void noChangeDetectorTests() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Future<String> process(AssetId assetId) =>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      processTemplates(reader, assetId, generateChangeDetectors: false);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should parse simple expressions in inline templates.', () async {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var inputPath =
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/inline_expression_files/hello.ng_deps.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/inline_expression_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should parse simple methods in inline templates.', () async {
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var inputPath = 'template_compiler/inline_method_files/hello.ng_deps.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/inline_method_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should parse simple expressions in linked templates.', () async {
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var inputPath = 'template_compiler/url_expression_files/hello.ng_deps.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/url_expression_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should parse simple methods in linked templates.', () async {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var inputPath = 'template_compiler/url_method_files/hello.ng_deps.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/url_method_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should not generated duplicate getters/setters', () async {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var inputPath = 'template_compiler/duplicate_files/hello.ng_deps.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/duplicate_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should parse `View` directives with a single dependency.', () async {
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var inputPath = 'template_compiler/one_directive_files/hello.ng_deps.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/one_directive_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should parse `View` directives with a single prefixed dependency.',
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      () async {
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var inputPath = 'template_compiler/with_prefix_files/hello.ng_deps.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/with_prefix_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    inputPath = 'template_compiler/with_prefix_files/goodbye.ng_deps.dart';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/with_prefix_files/expected/goodbye.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should parse angular directives with a prefix', () async {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var inputPath =
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/with_prefix_files/ng2_prefix.ng_deps.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/with_prefix_files/expected/ng2_prefix.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it('should create the same output for multiple calls.', () async {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var inputPath =
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/inline_expression_files/hello.ng_deps.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var expected = readFile(
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-23 09:06:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'template_compiler/inline_expression_files/expected/hello.ng_deps.dart');
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-10 14:55:48 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    var output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    output = await process(new AssetId('a', inputPath));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    _formatThenExpectEquals(output, expected);
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-05 10:31:21 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-19 09:16:21 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								void _formatThenExpectEquals(String actual, String expected) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  expect(formatter.format(actual)).toEqual(formatter.format(expected));
							 | 
						
					
						
							
								
									
										
										
										
											2015-03-13 13:55:49 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |