diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/TEST_CASES.json index f49047b6a331c..d727ec337781c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/TEST_CASES.json @@ -26,8 +26,7 @@ "files": [ { "generated": "local_reference_nested.js", - "expected": "local_reference_nested_template.js", - "templatePipelineExpected": "local_reference_nested.pipeline.js" + "expected": "local_reference_nested.pipeline.js" } ] } @@ -43,8 +42,7 @@ "failureMessage": "Incorrect template", "files": [ { - "expected": "local_reference_and_context_variables_template.js", - "templatePipelineExpected": "local_reference_and_context_variables_template.pipeline.js", + "expected": "local_reference_and_context_variables_template.pipeline.js", "generated": "local_reference_and_context_variables.js" } ] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/local_reference_and_context_variables_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/local_reference_and_context_variables_template.js deleted file mode 100644 index 25b0835ac46c2..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/local_reference_and_context_variables_template.js +++ /dev/null @@ -1,38 +0,0 @@ -function MyComponent_div_0_span_3_Template(rf, ctx) { - if (rf & 1) { - $i0$.ɵɵelementStart(0, "span"); - $i0$.ɵɵtext(1); - $i0$.ɵɵelementEnd(); - } - if (rf & 2) { - const $item$ = $i0$.ɵɵnextContext().$implicit; - const $foo$ = $i0$.ɵɵreference(2); - $r3$.ɵɵadvance(); - $i0$.ɵɵtextInterpolate2(" ", $foo$, " - ", $item$, " "); - } -} - -function MyComponent_div_0_Template(rf, ctx) { - if (rf & 1) { - $i0$.ɵɵelementStart(0, "div"); - $i0$.ɵɵelement(1, "div", null, 1); - $i0$.ɵɵtemplate(3, MyComponent_div_0_span_3_Template, 2, 2, "span", 2); - $i0$.ɵɵelementEnd(); - } - if (rf & 2) { - const $app$ = $i0$.ɵɵnextContext(); - $r3$.ɵɵadvance(3); - $i0$.ɵɵproperty("ngIf", $app$.showing); - } -} - -// ... -consts: [[__AttributeMarker.Template__, "ngFor", "ngForOf"], ["foo", ""], [__AttributeMarker.Template__, "ngIf"]], -template:function MyComponent_Template(rf, ctx){ - if (rf & 1) { - $i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 1, "div", 0); - } - if (rf & 2) { - $i0$.ɵɵproperty("ngForOf", ctx.items); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/local_reference_nested_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/local_reference_nested_template.js deleted file mode 100644 index 12ef10ec0f1f0..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/lifecycle_hooks/local_reference_nested_template.js +++ /dev/null @@ -1,55 +0,0 @@ -function MyComponent_div_3_span_2_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "span"); - $r3$.ɵɵtext(1); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵnextContext(); - const $bar$ = $r3$.ɵɵreference(4); - $r3$.ɵɵnextContext(); - const $foo$ = $r3$.ɵɵreference(1); - const $baz$ = $r3$.ɵɵreference(5); - $r3$.ɵɵadvance(); - $r3$.ɵɵtextInterpolate3("", $foo$, "-", $bar$, "-", $baz$, ""); - } -} -function MyComponent_div_3_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵtext(1); - $r3$.ɵɵtemplate(2, MyComponent_div_3_span_2_Template, 2, 3, "span", 1); - $r3$.ɵɵelement(3, "span", null, 3); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - const $bar$ = $r3$.ɵɵreference(4); - $r3$.ɵɵnextContext(); - const $foo$ = $r3$.ɵɵreference(1); - $r3$.ɵɵadvance(); - $r3$.ɵɵtextInterpolate2(" ", $foo$, "-", $bar$, " "); - } -} -// ... -MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ - type: MyComponent, - selectors: [["my-component"]], - decls: 6, - vars: 1, - consts: [["foo", ""], [__AttributeMarker.Template__, "if"], ["baz", ""], ["bar", ""]], - template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelement(0, "div", null, 0); - $r3$.ɵɵtext(2); - $r3$.ɵɵtemplate(3, MyComponent_div_3_Template, 5, 2, "div", 1); - $r3$.ɵɵelement(4, "div", null, 2); - } - if (rf & 2) { - const $foo$ = $r3$.ɵɵreference(1); - $r3$.ɵɵadvance(2); - $r3$.ɵɵtextInterpolate1(" ", $foo$, " "); - } - }, - dependencies:[IfDirective], - encapsulation: 2 -}); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/TEST_CASES.json index db3e54134d241..d9a7772cf3619 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/TEST_CASES.json @@ -47,8 +47,7 @@ "failureMessage": "Invalid MyApp definition", "files": [ { - "expected": "pipes_my_app_def.js", - "templatePipelineExpected": "pipes_my_app_def.pipeline.js", + "expected": "pipes_my_app_def.pipeline.js", "generated": "pipes.js" } ] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/pipes_my_app_def.js b/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/pipes_my_app_def.js deleted file mode 100644 index 5ac493c37fc2f..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/pipes/pipes_my_app_def.js +++ /dev/null @@ -1,27 +0,0 @@ -const $c0$ = $a0$ => [$a0$, 1, 2, 3, 4, 5]; -// ... -MyApp.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ - type: MyApp, - selectors: [["my-app"]], - decls: 7, - vars: 20, - template: function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0); - $r3$.ɵɵpipe(1, "myPurePipe"); - $r3$.ɵɵpipe(2, "myPipe"); - $r3$.ɵɵelementStart(3, "p"); - $r3$.ɵɵtext(4); - $r3$.ɵɵpipe(5, "myPipe"); - $r3$.ɵɵpipe(6, "myPipe"); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵtextInterpolate($r3$.ɵɵpipeBind2(1, 3, $r3$.ɵɵpipeBind2(2, 6, ctx.name, ctx.size), ctx.size)); - $r3$.ɵɵadvance(4); - $r3$.ɵɵtextInterpolate2("", $r3$.ɵɵpipeBindV(5, 9, $r3$.ɵɵpureFunction1(18, $c0$, ctx.name)), " ", ctx.name ? 1 : $r3$.ɵɵpipeBind1(6, 16, 2), ""); - } - }, - dependencies: [MyPipe, MyPurePipe], - encapsulation: 2 -}); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/TEST_CASES.json index a9a4d9a33d7a7..bfcd19ea1be87 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/TEST_CASES.json @@ -43,8 +43,7 @@ { "files": [ { - "expected": "safe_access_temporaries_template.js", - "templatePipelineExpected": "safe_access_temporaries_template.pipeline.js", + "expected": "safe_access_temporaries_template.pipeline.js", "generated": "safe_access_temporaries.js" } ], @@ -78,8 +77,7 @@ { "files": [ { - "expected": "safe_call_template.js", - "templatePipelineExpected": "safe_call_template.pipeline.js", + "expected": "safe_call_template.pipeline.js", "generated": "safe_call.js" } ], @@ -96,8 +94,7 @@ { "files": [ { - "expected": "safe_access_non_null_template.js", - "templatePipelineExpected": "safe_access_non_null_template.pipeline.js", + "expected": "safe_access_non_null_template.pipeline.js", "generated": "safe_access_non_null.js" } ], diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_non_null_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_non_null_template.js deleted file mode 100644 index 1e2c7ad0ddea6..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_non_null_template.js +++ /dev/null @@ -1,9 +0,0 @@ -template: function MyApp_Template(rf, $ctx$) { - if (rf & 1) { - i0.ɵɵtext(0); - } - if (rf & 2) { - let $tmp_0_0$; - i0.ɵɵtextInterpolate4(" ", $ctx$.val == null ? null : $ctx$.val.foo.bar, " ", $ctx$.val == null ? null : $ctx$.val[0].foo.bar, " ", ($tmp_0_0$ = $ctx$.foo($ctx$.val)) == null ? null : $tmp_0_0$.foo.bar, " ", ($tmp_0_0$ = $ctx$.val) == null ? null : $tmp_0_0$.foo.bar, " "); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_temporaries_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_temporaries_template.js deleted file mode 100644 index 9ed0ec7e79a5b..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_temporaries_template.js +++ /dev/null @@ -1,25 +0,0 @@ -} if (rf & 2) { - let $tmp_0_0$; - let $tmp_0_1$; - let $tmp_0_2$; - let $tmp_0_3$; - let $tmp_1_0$; - let $tmp_1_1$; - let $tmp_1_2$; - let $tmp_1_3$; - let $tmp_1_4$; - let $tmp_2_0$; - let $tmp_2_1$; - let $tmp_3_0$; - let $tmp_3_1$; - let $tmp_3_2$; - let $tmp_3_3$; - i0.ɵɵadvance(); - i0.ɵɵtextInterpolate1("Safe Property with Calls: ", ($tmp_0_0$ = ctx.p()) == null ? null : ($tmp_0_1$ = $tmp_0_0$.a()) == null ? null : ($tmp_0_2$ = $tmp_0_1$.b()) == null ? null : ($tmp_0_3$ = $tmp_0_2$.c()) == null ? null : $tmp_0_3$.d(), ""); - i0.ɵɵadvance(2); - i0.ɵɵtextInterpolate1("Safe and Unsafe Property with Calls: ", ctx.p == null ? null : ($tmp_1_0$ = ctx.p.a()) == null ? null : ($tmp_1_1$ = $tmp_1_0$.b().c().d()) == null ? null : ($tmp_1_2$ = $tmp_1_1$.e()) == null ? null : $tmp_1_2$.f == null ? null : $tmp_1_2$.f.g.h == null ? null : ($tmp_1_3$ = $tmp_1_2$.f.g.h.i()) == null ? null : ($tmp_1_4$ = $tmp_1_3$.j()) == null ? null : $tmp_1_4$.k().l, ""); - i0.ɵɵadvance(2); - i0.ɵɵtextInterpolate1("Nested Safe with Calls: ", ($tmp_2_0$ = ctx.f1()) == null ? null : $tmp_2_0$[($tmp_2_1$ = ctx.f2()) == null ? null : $tmp_2_1$.a] == null ? null : $tmp_2_0$[($tmp_2_1$ = $tmp_2_1$) == null ? null : $tmp_2_1$.a].b, ""); - i0.ɵɵadvance(2); - i0.ɵɵtextInterpolate1("Deep Nested Safe with Calls: ", ($tmp_3_0$ = ctx.f1()) == null ? null : $tmp_3_0$[($tmp_3_1$ = ctx.f2()) == null ? null : ($tmp_3_2$ = $tmp_3_1$.f3()) == null ? null : $tmp_3_2$[($tmp_3_3$ = ctx.f4()) == null ? null : $tmp_3_3$.f5()]] == null ? null : $tmp_3_0$[($tmp_3_1$ = $tmp_3_1$) == null ? null : ($tmp_3_2$ = $tmp_3_2$) == null ? null : $tmp_3_2$[($tmp_3_3$ = $tmp_3_3$) == null ? null : $tmp_3_3$.f5()]].f6(), ""); -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_call_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_call_template.js deleted file mode 100644 index 62afee632dfb9..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_call_template.js +++ /dev/null @@ -1,17 +0,0 @@ -template: function MyApp_Template(rf, $ctx$) { - if (rf & 1) { - $i0$.ɵɵelementStart(0, "span", 0); - $i0$.ɵɵtext(1); - $i0$.ɵɵelementEnd(); - } - if (rf & 2) { - let $tmp_0_0$; - let $tmp_1_0$; - let $tmp_1_1$; - let $tmp_1_2$; - let $tmp_1_3$; - $i0$.ɵɵproperty("title", "Your last name is " + (($tmp_0_0$ = $ctx$.person.getLastName == null ? null : $ctx$.person.getLastName()) !== null && $tmp_0_0$ !== undefined ? $tmp_0_0$ : "unknown")); - $i0$.ɵɵadvance(); - $i0$.ɵɵtextInterpolate2(" Hello, ", $ctx$.person.getName == null ? null : $ctx$.person.getName(), "! You are a Balrog: ", ($ctx$.person.getSpecies == null ? null : ($tmp_1_0$ = $ctx$.person.getSpecies()) == null ? null : ($tmp_1_1$ = $tmp_1_0$()) == null ? null : ($tmp_1_2$ = $tmp_1_1$()) == null ? null : ($tmp_1_3$ = $tmp_1_2$()) == null ? null : $tmp_1_3$()) || "unknown", " "); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/TEST_CASES.json index 969072755b861..b025ad0a07440 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/TEST_CASES.json @@ -89,8 +89,7 @@ "failureMessage": "Incorrect attribute array", "files": [ { - "expected": "exclude_bindings_from_consts_template.js", - "templatePipelineExpected": "exclude_bindings_from_consts_template.pipeline.js", + "expected": "exclude_bindings_from_consts_template.pipeline.js", "generated": "exclude_bindings_from_consts.js" } ] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/exclude_bindings_from_consts_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/exclude_bindings_from_consts_template.js deleted file mode 100644 index e5c6038ee8105..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/attribute_bindings/exclude_bindings_from_consts_template.js +++ /dev/null @@ -1,3 +0,0 @@ - -consts: [["target", "_blank", "aria-label", "link", __AttributeMarker.Bindings__, "title", "id", "customEvent"]], -… diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/TEST_CASES.json index 5ca1b0bef87d7..158f2560a2266 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/TEST_CASES.json @@ -379,8 +379,7 @@ "files": [ { "generated": "deceptive_attrs.js", - "expected": "deceptive_attrs.template.js", - "templatePipelineExpected": "deceptive_attrs.pipeline.js" + "expected": "deceptive_attrs.pipeline.js" } ] } diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/deceptive_attrs.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/deceptive_attrs.template.js deleted file mode 100644 index b628c765f9467..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/host_bindings/deceptive_attrs.template.js +++ /dev/null @@ -1,9 +0,0 @@ -hostAttrs: ["class.is-compact", "false", "style.width", "0", "attr.tabindex", "5"], -… -hostBindings: function MyComponent2_HostBindings(rf, ctx) { - if (rf & 2) { - i0.ɵɵattribute("tabindex", 5); - i0.ɵɵstyleProp("width", 0); - i0.ɵɵclassProp("is-compact", false); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/TEST_CASES.json index f9e47f8666e8b..08e0ad983b01c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/TEST_CASES.json @@ -12,8 +12,7 @@ "files": [ { "generated": "local_ref_on_host.js", - "expected": "local_ref_on_host.template.js", - "templatePipelineExpected": "local_ref_on_host.pipeline.js" + "expected": "local_ref_on_host.pipeline.js" } ] } diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/local_ref_on_host.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/local_ref_on_host.template.js deleted file mode 100644 index a60c148073dab..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_bindings/non_bindable_behavior/local_ref_on_host.template.js +++ /dev/null @@ -1,18 +0,0 @@ -consts: [["id", "my-id"], ["myRef", ""]], -template:function MyComponent_Template(rf, $ctx$){ - if (rf & 1) { - $i0$.ɵɵelementStart(0, "b", 0, 1); - $i0$.ɵɵdisableBindings(); - $i0$.ɵɵelementStart(2, "i"); - $i0$.ɵɵtext(3, "Hello {{ name }}!"); - $i0$.ɵɵelementEnd(); - $i0$.ɵɵenableBindings(); - $i0$.ɵɵelementEnd(); - $i0$.ɵɵtext(4); - } - if (rf & 2) { - const $_r0$ = $i0$.ɵɵreference(1); - $r3$.ɵɵadvance(4); - $i0$.ɵɵtextInterpolate1(" ", $_r0$.id, " "); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/TEST_CASES.json index 9330a92ecbcb0..149cf84654c54 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/TEST_CASES.json @@ -53,9 +53,8 @@ { "files": [ { - "expected": "switch_with_pipe_template.js", "generated": "switch_with_pipe.js", - "templatePipelineExpected": "switch_with_pipe_template.pipeline.js" + "expected": "switch_with_pipe_template.pipeline.js" } ], "failureMessage": "Incorrect template" @@ -144,9 +143,8 @@ { "files": [ { - "expected": "if_with_pipe_template.js", "generated": "if_with_pipe.js", - "templatePipelineExpected": "if_with_pipe_template.pipeline.js" + "expected": "if_with_pipe_template.pipeline.js" } ], "failureMessage": "Incorrect template" @@ -190,8 +188,7 @@ { "files": [ { - "expected": "if_nested_alias_listeners_template.js", - "templatePipelineExpected": "if_nested_alias_listeners_template.pipeline.js", + "expected": "if_nested_alias_listeners_template.pipeline.js", "generated": "if_nested_alias_listeners.js" } ], @@ -281,8 +278,7 @@ { "files": [ { - "expected": "for_template_variables_template.js", - "templatePipelineExpected": "for_template_variables_template.pipeline.js", + "expected": "for_template_variables_template.pipeline.js", "generated": "for_template_variables.js" } ], @@ -297,8 +293,7 @@ { "files": [ { - "expected": "for_aliased_template_variables_template.js", - "templatePipelineExpected": "for_aliased_template_variables_template.pipeline.js", + "expected": "for_aliased_template_variables_template.pipeline.js", "generated": "for_aliased_template_variables.js" } ], @@ -328,8 +323,7 @@ { "files": [ { - "expected": "for_template_variables_listener_template.js", - "templatePipelineExpected": "for_template_variables_listener_template.pipeline.js", + "expected": "for_template_variables_listener_template.pipeline.js", "generated": "for_template_variables_listener.js" } ], @@ -374,8 +368,7 @@ { "files": [ { - "expected": "for_template_variables_scope_template.js", - "templatePipelineExpected": "for_template_variables_scope_template.pipeline.js", + "expected": "for_template_variables_scope_template.pipeline.js", "generated": "for_template_variables_scope.js" } ], diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_aliased_template_variables_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_aliased_template_variables_template.js deleted file mode 100644 index a7b6c50a409e9..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_aliased_template_variables_template.js +++ /dev/null @@ -1,25 +0,0 @@ -function MyApp_For_3_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0); - } - if (rf & 2) { - const $idx_r2$ = ctx.$index; - const $co_r3$ = ctx.$count; - $r3$.ɵɵtextInterpolate6(" Index: ", $idx_r2$, " First: ", $idx_r2$ === 0, " Last: ", $idx_r2$ === $co_r3$ - 1, " Even: ", $idx_r2$ % 2 === 0, " Odd: ", $idx_r2$ % 2 !== 0, " Count: ", $co_r3$, " "); - } -} -… -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵtext(1); - $r3$.ɵɵrepeaterCreate(2, MyApp_For_3_Template, 1, 6, null, null, $r3$.ɵɵrepeaterTrackByIdentity); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵadvance(); - $r3$.ɵɵtextInterpolate1(" ", ctx.message, " "); - $r3$.ɵɵadvance(); - $r3$.ɵɵrepeater(ctx.items); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_listener_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_listener_template.js deleted file mode 100644 index d72b8fc5051b4..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_listener_template.js +++ /dev/null @@ -1,29 +0,0 @@ -function MyApp_For_3_Template(rf, ctx) { - if (rf & 1) { - const $_r5$ = $r3$.ɵɵgetCurrentView(); - $r3$.ɵɵelementStart(0, "div", 0); - $r3$.ɵɵlistener("click", function MyApp_For_3_Template_div_click_0_listener() { - const $restoredCtx$ = $r3$.ɵɵrestoreView($_r5$); - const $index_r2$ = $restoredCtx$.$index; - const $count_r3$ = $restoredCtx$.$count; - const $ctx_r4$ = $r3$.ɵɵnextContext(); - return $r3$.ɵɵresetView($ctx_r4$.log($index_r2$, $index_r2$ % 2 === 0, $index_r2$ === 0, $count_r3$)); - }); - $r3$.ɵɵelementEnd(); - } -} -… -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵtext(1); - $r3$.ɵɵrepeaterCreate(2, MyApp_For_3_Template, 1, 0, "div", null, $r3$.ɵɵrepeaterTrackByIdentity); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵadvance(); - $r3$.ɵɵtextInterpolate1(" ", ctx.message, " "); - $r3$.ɵɵadvance(); - $r3$.ɵɵrepeater(ctx.items); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_scope_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_scope_template.js deleted file mode 100644 index 105513aa40339..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_scope_template.js +++ /dev/null @@ -1,25 +0,0 @@ -function MyApp_For_2_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0); - } - if (rf & 2) { - const $index_r2$ = ctx.$index; - const $count_r3$ = ctx.$count; - $r3$.ɵɵtextInterpolate4(" ", $index_r2$, " ", $count_r3$, " ", $index_r2$ === 0, " ", $index_r2$ === $count_r3$ - 1, " "); - } -} -… -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0); - $r3$.ɵɵrepeaterCreate(1, MyApp_For_2_Template, 1, 4, null, null, $r3$.ɵɵrepeaterTrackByIdentity); - $r3$.ɵɵtext(3); - } - if (rf & 2) { - $r3$.ɵɵtextInterpolate4(" ", ctx.$index, " ", ctx.$count, " ", ctx.$first, " ", ctx.$last, " "); - $r3$.ɵɵadvance(); - $r3$.ɵɵrepeater(ctx.items); - $r3$.ɵɵadvance(2); - $r3$.ɵɵtextInterpolate4(" ", ctx.$index, " ", ctx.$count, " ", ctx.$first, " ", ctx.$last, " "); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_template.js deleted file mode 100644 index 34a60680c7bec..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/for_template_variables_template.js +++ /dev/null @@ -1,25 +0,0 @@ -function MyApp_For_3_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0); - } - if (rf & 2) { - const $index_r2$ = ctx.$index; - const $count_r3$ = ctx.$count; - $r3$.ɵɵtextInterpolate6(" Index: ", $index_r2$, " First: ", $index_r2$ === 0, " Last: ", $index_r2$ === $count_r3$ - 1, " Even: ", $index_r2$ % 2 === 0, " Odd: ", $index_r2$ % 2 !== 0, " Count: ", $count_r3$, " "); - } -} -… -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵtext(1); - $r3$.ɵɵrepeaterCreate(2, MyApp_For_3_Template, 1, 6, null, null, $r3$.ɵɵrepeaterTrackByIdentity); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵadvance(); - $r3$.ɵɵtextInterpolate1(" ", ctx.message, " "); - $r3$.ɵɵadvance(); - $r3$.ɵɵrepeater(ctx.items); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_nested_alias_listeners_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_nested_alias_listeners_template.js deleted file mode 100644 index af01f166091b4..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_nested_alias_listeners_template.js +++ /dev/null @@ -1,68 +0,0 @@ -function MyApp_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) { - if (rf & 1) { - const $_r7$ = $r3$.ɵɵgetCurrentView(); - $r3$.ɵɵelementStart(0, "button", 0); - $r3$.ɵɵlistener("click", function MyApp_Conditional_0_Conditional_1_Conditional_1_Template_button_click_0_listener() { - const $restoredCtx$ = $r3$.ɵɵrestoreView($_r7$); - const $innermost_r5$ = $restoredCtx$; - const $inner_r3$ = $r3$.ɵɵnextContext(); - const $root_r1$ = $r3$.ɵɵnextContext(); - const $ctx_r6$ = $r3$.ɵɵnextContext(); - return $r3$.ɵɵresetView($ctx_r6$.log($ctx_r6$.value(), $root_r1$, $inner_r3$, $innermost_r5$)); - }); - $r3$.ɵɵelementEnd(); - } -} - -function MyApp_Conditional_0_Conditional_1_Template(rf, ctx) { - if (rf & 1) { - const $_r11$ = $r3$.ɵɵgetCurrentView(); - $r3$.ɵɵelementStart(0, "button", 0); - $r3$.ɵɵlistener("click", function MyApp_Conditional_0_Conditional_1_Template_button_click_0_listener() { - const $restoredCtx$ = $r3$.ɵɵrestoreView($_r11$); - const $inner_r3$ = $restoredCtx$; - const $root_r1$ = $r3$.ɵɵnextContext(); - const $ctx_r10$ = $r3$.ɵɵnextContext(); - return $r3$.ɵɵresetView($ctx_r10$.log($ctx_r10$.value(), $root_r1$, $inner_r3$)); - }); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵtemplate(1, MyApp_Conditional_0_Conditional_1_Conditional_1_Template, 1, 0, "button"); - } - if (rf & 2) { - const $ctx_r2$ = $r3$.ɵɵnextContext(2); - let MyApp_Conditional_0_Conditional_1_contFlowTmp; - $r3$.ɵɵadvance(); - $r3$.ɵɵconditional(1, (MyApp_Conditional_0_Conditional_1_contFlowTmp = $ctx_r2$.value()) ? 1 : -1, MyApp_Conditional_0_Conditional_1_contFlowTmp); - } -} - -function MyApp_Conditional_0_Template(rf, ctx) { - if (rf & 1) { - const $_r14$ = $r3$.ɵɵgetCurrentView(); - $r3$.ɵɵelementStart(0, "button", 0); - $r3$.ɵɵlistener("click", function MyApp_Conditional_0_Template_button_click_0_listener() { - const $restoredCtx$ = $r3$.ɵɵrestoreView($_r14$); - const $root_r1$ = $restoredCtx$; - const $ctx_r13$ = $r3$.ɵɵnextContext(); - return $r3$.ɵɵresetView($ctx_r13$.log($ctx_r13$.value(), $root_r1$)); - }); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵtemplate(1, MyApp_Conditional_0_Conditional_1_Template, 2, 1); - } - if (rf & 2) { - const ctx_r0 = $r3$.ɵɵnextContext(); - let MyApp_Conditional_0_contFlowTmp; - $r3$.ɵɵadvance(); - $r3$.ɵɵconditional(1, (MyApp_Conditional_0_contFlowTmp = ctx_r0.value()) ? 1 : -1, MyApp_Conditional_0_contFlowTmp); - } -} -… -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyApp_Conditional_0_Template, 2, 1); - } - if (rf & 2) { - let MyApp_contFlowTmp; - $r3$.ɵɵconditional(0, (MyApp_contFlowTmp = ctx.value()) ? 0 : -1, MyApp_contFlowTmp); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_with_pipe_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_with_pipe_template.js deleted file mode 100644 index 0138ee3c9dedb..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_with_pipe_template.js +++ /dev/null @@ -1,36 +0,0 @@ -function $MyApp_Conditional_3_Template$(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0, " one "); - } -} - -function $MyApp_Conditional_5_Template$(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0, " two "); - } -} - -function $MyApp_Conditional_6_Template$(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0, " three "); - } -} -… -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵtext(1); - $r3$.ɵɵtemplate(2, MyApp_Conditional_2_Template, 1, 0); - $r3$.ɵɵpipe(3, "test"); - $r3$.ɵɵtemplate(4, MyApp_Conditional_4_Template, 1, 0); - $r3$.ɵɵpipe(5, "test"); - $r3$.ɵɵtemplate(6, MyApp_Conditional_6_Template, 1, 0); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵadvance(); - $r3$.ɵɵtextInterpolate1(" ", ctx.message, " "); - $r3$.ɵɵadvance(); - $r3$.ɵɵconditional(2, $r3$.ɵɵpipeBind1(3, 2, ctx.val) === 1 ? 2 : $r3$.ɵɵpipeBind1(5, 4, ctx.val) === 2 ? 4 : 6); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/switch_with_pipe_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/switch_with_pipe_template.js deleted file mode 100644 index ea00c6340ef44..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/switch_with_pipe_template.js +++ /dev/null @@ -1,20 +0,0 @@ -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵtext(1); - $r3$.ɵɵtemplate(2, MyApp_Case_2_Template, 1, 0); - $r3$.ɵɵpipe(3, "test"); - $r3$.ɵɵtemplate(4, MyApp_Case_4_Template, 1, 0); - $r3$.ɵɵpipe(5, "test"); - $r3$.ɵɵtemplate(6, MyApp_Case_6_Template, 1, 0); - $r3$.ɵɵpipe(7, "test"); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - let MyApp_contFlowTmp; - $r3$.ɵɵadvance(); - $r3$.ɵɵtextInterpolate1(" ", ctx.message, " "); - $r3$.ɵɵadvance(); - $r3$.ɵɵconditional(2, (MyApp_contFlowTmp = $r3$.ɵɵpipeBind1(7, 6, ctx.value())) === $r3$.ɵɵpipeBind1(3, 2, 0) ? 2 : MyApp_contFlowTmp === $r3$.ɵɵpipeBind1(5, 4, 1) ? 4 : 6); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/TEST_CASES.json index 29359f2654b57..33d03cb5caa4c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/TEST_CASES.json @@ -142,8 +142,7 @@ { "files": [ { - "expected": "deferred_when_with_pipe_template.js", - "templatePipelineExpected": "deferred_when_with_pipe_template.pipeline.js", + "expected": "deferred_when_with_pipe_template.pipeline.js", "generated": "deferred_when_with_pipe.js" } ], diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/deferred_when_with_pipe_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/deferred_when_with_pipe_template.js deleted file mode 100644 index 67d010be5ee3d..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/deferred_when_with_pipe_template.js +++ /dev/null @@ -1,13 +0,0 @@ -function MyApp_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtext(0); - $r3$.ɵɵtemplate(1, MyApp_Defer_1_Template, 1, 0); - $r3$.ɵɵdefer(2, 1); - $r3$.ɵɵpipe(4, "testPipe"); - } - if (rf & 2) { - $r3$.ɵɵtextInterpolate1(" ", ctx.message, " "); - $r3$.ɵɵadvance(2); - $r3$.ɵɵdeferWhen(ctx.isVisible() && $r3$.ɵɵpipeBind1(4, 2, ctx.isReady)); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/TEST_CASES.json index 9a085d5d2628e..2ed7b1c54bb70 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/TEST_CASES.json @@ -14,8 +14,7 @@ ], "files": [ { - "expected": "meaning_description_template.js", - "templatePipelineExpected": "meaning_description_template.pipeline.js", + "expected": "meaning_description_template.pipeline.js", "generated": "meaning_description.js" } ] @@ -63,8 +62,7 @@ ], "files": [ { - "expected": "ng-template_interpolation_template.js", - "templatePipelineExpected": "ng-template_interpolation_template.pipeline.js", + "expected": "ng-template_interpolation_template.pipeline.js", "generated": "ng-template_interpolation.js" } ] @@ -84,8 +82,7 @@ ], "files": [ { - "expected": "ng-template_interpolation_structural_template.js", - "templatePipelineExpected": "ng-template_interpolation_structural_template.pipeline.js", + "expected": "ng-template_interpolation_structural_template.pipeline.js", "generated": "ng-template_interpolation_structural.js" } ] @@ -147,8 +144,7 @@ ], "files": [ { - "expected": "static_attributes_structural_template.js", - "templatePipelineExpected": "static_attributes_structural_template.pipeline.js", + "expected": "static_attributes_structural_template.pipeline.js", "generated": "static_attributes_structural.js" } ] @@ -168,8 +164,7 @@ ], "files": [ { - "expected": "interpolation_basic_template.js", - "templatePipelineExpected": "interpolation_basic_template.pipeline.js", + "expected": "interpolation_basic_template.pipeline.js", "generated": "interpolation_basic.js" } ] @@ -189,8 +184,7 @@ ], "files": [ { - "expected": "interpolation_custom_config_template.js", - "templatePipelineExpected": "interpolation_custom_config_template.pipeline.js", + "expected": "interpolation_custom_config_template.pipeline.js", "generated": "interpolation_custom_config.js" } ] @@ -210,8 +204,7 @@ ], "files": [ { - "expected": "interpolation_nested_context_template.js", - "templatePipelineExpected": "interpolation_nested_context_template.pipeline.js", + "expected": "interpolation_nested_context_template.pipeline.js", "generated": "interpolation_nested_context.js" } ] @@ -231,8 +224,7 @@ ], "files": [ { - "expected": "interpolation_complex_expressions_template.js", - "templatePipelineExpected": "interpolation_complex_expressions_template.pipeline.js", + "expected": "interpolation_complex_expressions_template.pipeline.js", "generated": "interpolation_complex_expressions.js" } ] @@ -252,8 +244,7 @@ ], "files": [ { - "expected": "i18n_root_node_template.js", - "templatePipelineExpected": "i18n_root_node_template.pipeline.js", + "expected": "i18n_root_node_template.pipeline.js", "generated": "i18n_root_node.js" } ] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/i18n_root_node_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/i18n_root_node_template.js deleted file mode 100644 index 3a9fd10e174cf..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/i18n_root_node_template.js +++ /dev/null @@ -1,15 +0,0 @@ -consts: () => { - __i18nMsg__('Element title', [], {}, {meaning: 'm', desc: 'd'}) - __i18nMsg__('Some content', [], {}, {}) - return [ - ["title", $i18n_0$], - $i18n_1$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div", 0); - $r3$.ɵɵi18n(1, 1); - $r3$.ɵɵelementEnd(); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_basic_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_basic_template.js deleted file mode 100644 index 408753ab6d624..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_basic_template.js +++ /dev/null @@ -1,34 +0,0 @@ -decls: 5, -vars: 8, -consts: () => { - __i18nMsg__('static text', [], {}, {}) - __i18nMsg__('intro {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueA | uppercase }}'}}, {meaning: 'm', desc: 'd'}) - __i18nMsg__('{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueB }}'}}, {meaning: 'm1', desc: 'd1'}) - __i18nMsg__('{$interpolation} and {$interpolation_1} and again {$interpolation_2}', [['interpolation', String.raw`\uFFFD0\uFFFD`],['interpolation_1', String.raw`\uFFFD1\uFFFD`],['interpolation_2', String.raw`\uFFFD2\uFFFD`]], {original_code: {'interpolation': '{{ valueA }}', 'interpolation_1': '{{ valueB }}', 'interpolation_2': '{{ valueA + valueB }}'}}, {meaning: 'm2', desc: 'd2'}) - __i18nMsg__('{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueC }}'}}, {}) -return [ - ["id", "dynamic-1", "aria-roledescription", $i18n_0$, __AttributeMarker.I18n__, - "title", "aria-label"], - ["title", $i18n_1$, "aria-label", $i18n_2$], - ["id", "dynamic-2", __AttributeMarker.I18n__, "title", "aria-roledescription"], - ["title", $i18n_3$, "aria-roledescription", $i18n_4$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div", 0); - $r3$.ɵɵpipe(1, "uppercase"); - $r3$.ɵɵi18nAttributes(2, 1); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(3, "div", 2); - $r3$.ɵɵi18nAttributes(4, 3); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(1, 6, ctx.valueA))(ctx.valueB); - $r3$.ɵɵi18nApply(2); - $r3$.ɵɵadvance(3); - $r3$.ɵɵi18nExp(ctx.valueA)(ctx.valueB)(ctx.valueA + ctx.valueB)(ctx.valueC); - $r3$.ɵɵi18nApply(4); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_complex_expressions_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_complex_expressions_template.js deleted file mode 100644 index 41257ac0c3126..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_complex_expressions_template.js +++ /dev/null @@ -1,21 +0,0 @@ -decls: 2, -vars: 1, -consts: () => { - __i18nMsg__('{$interpolation} title', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{valueA.getRawValue()?.getTitle()}}'}}, {}) - return [ - [__AttributeMarker.I18n__, "title"], - ["title", $i18n_0$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div", 0); - $r3$.ɵɵi18nAttributes(1, 1); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - let $tmp_0_0$; - $r3$.ɵɵi18nExp(($tmp_0_0$ = ctx.valueA.getRawValue()) == null ? null : $tmp_0_0$.getTitle()); - $r3$.ɵɵi18nApply(1); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_custom_config_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_custom_config_template.js deleted file mode 100644 index 4353958af65e9..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_custom_config_template.js +++ /dev/null @@ -1,19 +0,0 @@ -consts: () => { - __i18nMsg__('intro {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{% valueA | uppercase %}'}}, {meaning: 'm', desc: 'd'}) - return [ - [__AttributeMarker.I18n__, "title"], - ["title", $i18n_0$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div", 0); - $r3$.ɵɵpipe(1, "uppercase"); - $r3$.ɵɵi18nAttributes(2, 1); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(1, 1, ctx.valueA)); - $r3$.ɵɵi18nApply(2); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_nested_context_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_nested_context_template.js deleted file mode 100644 index 4d29ccf03be04..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_nested_context_template.js +++ /dev/null @@ -1,33 +0,0 @@ -function MyComponent_div_0_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div")(1, "div", 1); - $r3$.ɵɵpipe(2, "uppercase"); - $r3$.ɵɵi18nAttributes(3, 2); - $r3$.ɵɵelementEnd()(); - } - if (rf & 2) { - const $outer_r1$ = ctx.$implicit; - $r3$.ɵɵadvance(); - $r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(2, 1, $outer_r1$)); - $r3$.ɵɵi18nApply(3); - } -} -… -decls: 1, -vars: 1, -consts: () => { - __i18nMsg__('different scope {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ outer | uppercase }}'}}, {meaning: 'm', desc: 'd'}) - return [ - [__AttributeMarker.Template__, "ngFor", "ngForOf"], - [__AttributeMarker.I18n__, "title"], - ["title", $i18n_0$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 3, "div", 0); - } - if (rf & 2) { - $r3$.ɵɵproperty("ngForOf", ctx.items); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/meaning_description_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/meaning_description_template.js deleted file mode 100644 index a4c361d2d5ff8..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/meaning_description_template.js +++ /dev/null @@ -1,67 +0,0 @@ -consts: - () => { - __i18nMsg__('Content A', [], {}, {id: 'idA', meaning: 'meaningA', desc: 'descA'}) - __i18nMsg__('Title B', [], {}, {id: 'idB', meaning: 'meaningB', desc: 'descB'}) - __i18nMsg__('Title C', [], {}, {meaning: 'meaningC'}) - __i18nMsg__('Title D', [], {}, {meaning: 'meaningD', desc: 'descD'}) - __i18nMsg__('Title E', [], {}, {id: 'idE', desc: 'meaningE'}) - __i18nMsg__('Title F', [], {}, {id: 'idF'}) - - // NOTE: Keeping this block as a raw string, since it checks escaping of special chars. - let $i18n_23$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @desc [BACKUP_${MESSAGE}_ID:idH]`desc - */ - const $MSG_EXTERNAL_idG$$APP_SPEC_TS_24$ = goog.getMsg("Title G"); - $i18n_23$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_24$; - } else { - $i18n_23$ = $localize`:[BACKUP_$\{MESSAGE}_ID\:idH]\`desc@@idG:Title G`; - } - - // NOTE: Keeping this block as a raw string, since it checks escaping of special chars. - let $i18n_7$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @desc Some text \' [BACKUP_MESSAGE_ID: xxx] - */ - const $MSG_EXTERNAL_idG$$APP_SPEC_TS_21$ = goog.getMsg("Content H"); - $i18n_7$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_21$; - } else { - $i18n_7$ = $localize`:Some text \\' [BACKUP_MESSAGE_ID\: xxx]:Content H`; - } - - return [ - $i18n_0$, ["title", $i18n_1$], ["title", $i18n_2$], ["title", $i18n_3$], - ["title", $i18n_4$], ["title", $i18n_5$], ["title", $i18n_6$], $i18n_7$ - ]; - }, - - template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵi18n(1, 0); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(2, "div", 1); - $r3$.ɵɵtext(3, "Content B"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(4, "div", 2); - $r3$.ɵɵtext(5, "Content C"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(6, "div", 3); - $r3$.ɵɵtext(7, "Content D"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(8, "div", 4); - $r3$.ɵɵtext(9, "Content E"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(10, "div", 5); - $r3$.ɵɵtext(11, "Content F"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(12, "div", 6); - $r3$.ɵɵtext(13, "Content G"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(14, "div"); - $r3$.ɵɵi18n(15, 7); - $r3$.ɵɵelementEnd(); - } - } diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/ng-template_interpolation_structural_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/ng-template_interpolation_structural_template.js deleted file mode 100644 index 2d8d727aebfed..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/ng-template_interpolation_structural_template.js +++ /dev/null @@ -1,28 +0,0 @@ -function MyComponent_0_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_0_ng_template_0_Template, 0, 0, "ng-template", 1); - $r3$.ɵɵi18nAttributes(1, 2); - } - if (rf & 2) { - const $ctx_r2$ = $r3$.ɵɵnextContext(); - $r3$.ɵɵi18nExp($ctx_r2$.name); - $r3$.ɵɵi18nApply(1); - } -} -… -consts: () => { - __i18nMsg__('Hello {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ name }}'}}, {}) - return [ - [__AttributeMarker.Template__, "ngIf"], - [__AttributeMarker.Bindings__, "title"], - ["title", $i18n_0$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_0_Template, 2, 1, null, 0); - } - if (rf & 2) { - $r3$.ɵɵproperty("ngIf", true); - } -}, diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/ng-template_interpolation_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/ng-template_interpolation_template.js deleted file mode 100644 index e00e7454b4f1d..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/ng-template_interpolation_template.js +++ /dev/null @@ -1,17 +0,0 @@ -consts: () => { - __i18nMsg__('Hello {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ name }}'}}, {}) - return [ - [__AttributeMarker.Bindings__, "title"], - ["title", $i18n_0$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", 0); - $r3$.ɵɵi18nAttributes(1, 1); - } - if (rf & 2) { - $r3$.ɵɵi18nExp(ctx.name); - $r3$.ɵɵi18nApply(1); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/static_attributes_structural_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/static_attributes_structural_template.js deleted file mode 100644 index bd5f84d9cf50e..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/static_attributes_structural_template.js +++ /dev/null @@ -1,21 +0,0 @@ -function MyComponent_div_0_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelement(0, "div", 1); - } -} -… -consts: () => { - __i18nMsg__('introduction', [], {}, {meaning: 'm', desc: 'd'}) - return [ - ["id", "static", "title", $i18n_0$, __AttributeMarker.Template__, "ngIf"], - ["id", "static", "title", $i18n_0$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", 0); - } - if (rf & 2) { - $r3$.ɵɵproperty("ngIf", ctx.exp); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/TEST_CASES.json index b5082de5bf407..ea940b2832f11 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/TEST_CASES.json @@ -53,8 +53,7 @@ "files": [ { "generated": "bare_icu.js", - "expected": "bare_icu.template.js", - "templatePipelineExpected": "bare_icu.pipeline.js" + "expected": "bare_icu.pipeline.js" } ], "extraChecks": [ diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/bare_icu.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/bare_icu.template.js deleted file mode 100644 index f05f84a8e6c85..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/bare_icu.template.js +++ /dev/null @@ -1,64 +0,0 @@ -function $MyComponent_div_2_Template$(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div", 3); - $r3$.ɵɵtext(1, " "); - $r3$.ɵɵi18n(2, 4); - $r3$.ɵɵtext(3, " "); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - const $ctx_r0$ = $r3$.ɵɵnextContext(); - $r3$.ɵɵadvance(2); - $r3$.ɵɵi18nExp($ctx_r0$.age); - $r3$.ɵɵi18nApply(2); - } -} -… -function $MyComponent_div_3_Template$(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div", 5); - $r3$.ɵɵtext(1, " You have "); - $r3$.ɵɵi18n(2, 6); - $r3$.ɵɵtext(3, ". "); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - const $ctx_r1$ = $r3$.ɵɵnextContext(); - $r3$.ɵɵadvance(2); - $r3$.ɵɵi18nExp($ctx_r1$.count)($ctx_r1$.count); - $r3$.ɵɵi18nApply(2); - } -} -… -decls: 4, -vars: 3, -consts: () => { - __i18nIcuMsg__('{VAR_SELECT, select, male {male} female {female} other {other}}', [['VAR_SELECT', String.raw`\uFFFD0\uFFFD`]], {}) __i18nIcuMsg__('{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}', [['VAR_SELECT', String.raw`\uFFFD0\uFFFD`]], {}) - __i18nIcuMsg__('{VAR_SELECT, select, 0 {no emails} 1 {one email} other {{INTERPOLATION} emails}}', [['INTERPOLATION', String.raw`\uFFFD1\uFFFD`], ['VAR_SELECT', String.raw`\uFFFD0\uFFFD`]], {}) - return [ - $i18n_0$, - ["title", "icu only", __AttributeMarker.Template__, "ngIf"], - ["title", "icu and text", __AttributeMarker.Template__, "ngIf"], - ["title", "icu only"], - $i18n_1$, - ["title", "icu and text"], - $i18n_2$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵi18n(1, 0); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵtemplate(2, $MyComponent_div_2_Template$, 4, 1, "div", 1)(3, $MyComponent_div_3_Template$, 4, 2, "div", 2); - } - if (rf & 2) { - $r3$.ɵɵadvance(); - $r3$.ɵɵi18nExp(ctx.gender); - $r3$.ɵɵi18nApply(1); - $r3$.ɵɵadvance(); - $r3$.ɵɵproperty("ngIf", ctx.visible); - $r3$.ɵɵadvance(); - $r3$.ɵɵproperty("ngIf", ctx.available); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/TEST_CASES.json index 9535194edc66a..0df6709834c9b 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/TEST_CASES.json @@ -17,8 +17,7 @@ "files": [ { "generated": "legacy_enabled.js", - "expected": "legacy_enabled.template.js", - "templatePipelineExpected": "legacy_enabled.pipeline.js" + "expected": "legacy_enabled.pipeline.js" } ], "extraChecks": [ diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/legacy_enabled.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/legacy_enabled.template.js deleted file mode 100644 index dd0ac8e46eb28..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/localize_legacy_message_ids/legacy_enabled.template.js +++ /dev/null @@ -1,123 +0,0 @@ -consts: () => { - let $i18n_0$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_2908931752694090721$$LEGACY_ENABLED_TS_1$ = goog.getMsg( - "Some & attribute"); - $i18n_0$ = $MSG_EXTERNAL_2908931752694090721$$LEGACY_ENABLED_TS_1$; - } else { - $i18n_0$ = $localize`:␟82ec661067f503a3357ecc159b2128325e9208cd␟2908931752694090721:Some & attribute`; - } - let $i18n_2$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_4700340487900776701$$LEGACY_ENABLED_TS_3$ = goog.getMsg( - "Some & message"); - $i18n_2$ = $MSG_EXTERNAL_4700340487900776701$$LEGACY_ENABLED_TS_3$; - } else { - $i18n_2$ = $localize`:␟10adaf0ad7b8ba40200cd3c0e7c8d0f13280d522␟4700340487900776701:Some & message`; - } - let $i18n_4$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_2334195497629636162$$LEGACY_ENABLED_TS_5$ = goog.getMsg( - "Some & {$interpolation} attribute", {"interpolation": "\uFFFD0\uFFFD"}, - {original_code: {"interpolation": "{{'interpolated'}}"}}); - $i18n_4$ = $MSG_EXTERNAL_2334195497629636162$$LEGACY_ENABLED_TS_5$; - } else { - $i18n_4$ = $localize`:␟57ebd20267116c04cc1dbd7be0b73bf56484f45d␟2334195497629636162:Some & ${"\uFFFD0\uFFFD"}:INTERPOLATION: attribute`; - } - let $i18n_6$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_3204054277547499090$$LEGACY_ENABLED_TS_7$ = goog.getMsg( - "Some & {$interpolation} message", {"interpolation": "\uFFFD0\uFFFD"}, - {original_code: {"interpolation": "{{'interpolated' }}"}}); - $i18n_6$ = $MSG_EXTERNAL_3204054277547499090$$LEGACY_ENABLED_TS_7$; - } else { - $i18n_6$ = $localize`:␟28d558ca32556f1da67a333e3dada321a97212cd␟3204054277547499090:Some & ${"\uFFFD0\uFFFD"}:INTERPOLATION: message`; - } - let $i18n_8$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_2406634758623728945$$LEGACY_ENABLED_TS_9$ = goog.getMsg( - "&"); - $i18n_8$ = $MSG_EXTERNAL_2406634758623728945$$LEGACY_ENABLED_TS_9$; - } else { - $i18n_8$ = $localize`:␟0b3dff7b9382b6217ac97c99f9b04df04381bfdd␟2406634758623728945:&`; - } - let $i18n_10$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_4156372478368653226$$LEGACY_ENABLED_TS_11$ = goog.getMsg( - "&\""); - $i18n_10$ = $MSG_EXTERNAL_4156372478368653226$$LEGACY_ENABLED_TS_11$; - } else { - $i18n_10$ = $localize`:␟25b7cbf210e59a931423097cb7f2e1b72991a687␟4156372478368653226:&"`; - } - let $i18n_12$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_2720535395337591908$$LEGACY_ENABLED_TS_13$ = goog.getMsg( - "\""); - $i18n_12$ = $MSG_EXTERNAL_2720535395337591908$$LEGACY_ENABLED_TS_13$; - } else { - $i18n_12$ = $localize`:␟5b30d888e99e7c6cfc6265f89c39b5921805cd2e␟2720535395337591908:"`; - } - let $i18n_14$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_3600934704948217447$$LEGACY_ENABLED_TS_15$ = goog.getMsg( - "\"\""); - $i18n_14$ = $MSG_EXTERNAL_3600934704948217447$$LEGACY_ENABLED_TS_15$; - } else { - $i18n_14$ = $localize`:␟bdfdbea9161864191756930161fd41b8bc980fde␟3600934704948217447:""`; - } - return [["title", $i18n_0$], $i18n_2$, [6, "title"], ["title", $i18n_4$], $i18n_6$, - $i18n_8$, $i18n_10$, ["title", $i18n_12$], ["title", $i18n_14$]]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - i0.ɵɵelement(0, "div", 0); - i0.ɵɵelementStart(1, "div"); - i0.ɵɵi18n(2, 1); - i0.ɵɵelementEnd(); - i0.ɵɵelementStart(3, "div", 2); - i0.ɵɵi18nAttributes(4, 3); - i0.ɵɵelementEnd(); - i0.ɵɵelementStart(5, "div"); - i0.ɵɵi18n(6, 4); - i0.ɵɵelementEnd(); - i0.ɵɵelementStart(7, "div"); - i0.ɵɵi18n(8, 5); - i0.ɵɵelementEnd(); - i0.ɵɵelementStart(9, "div"); - i0.ɵɵi18n(10, 6); - i0.ɵɵelementEnd(); - i0.ɵɵelement(11, "div", 7)(12, "div", 8); - } - if (rf & 2) { - i0.ɵɵadvance(3); - i0.ɵɵi18nExp("interpolated"); - i0.ɵɵi18nApply(4); - i0.ɵɵadvance(3); - i0.ɵɵi18nExp("interpolated"); - i0.ɵɵi18nApply(6); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/TEST_CASES.json index 90e369bc853b3..3da69fcf44e57 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/TEST_CASES.json @@ -11,8 +11,7 @@ "files": [ { "generated": "foreign_object.js", - "expected": "foreign_object.template.js", - "templatePipelineExpected": "foreign_object.pipeline.js" + "expected": "foreign_object.pipeline.js" } ], "extraChecks": [ @@ -32,8 +31,7 @@ "files": [ { "generated": "namespaced_div.js", - "expected": "namespaced_div.template.js", - "templatePipelineExpected": "namespaced_div.pipeline.js" + "expected": "namespaced_div.pipeline.js" } ], "extraChecks": [ diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/foreign_object.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/foreign_object.template.js deleted file mode 100644 index b03cef3a4c9d8..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/foreign_object.template.js +++ /dev/null @@ -1,44 +0,0 @@ - -consts: () => { - let $I18N_0$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_7128002169381370313$$APP_SPEC_TS_1$ = goog.getMsg("{$startTagXhtmlDiv} Count: {$startTagXhtmlSpan}5{$closeTagXhtmlSpan}{$closeTagXhtmlDiv}", { - "closeTagXhtmlDiv": "\uFFFD/#3\uFFFD", - "closeTagXhtmlSpan": "\uFFFD/#4\uFFFD", - "startTagXhtmlDiv": "\uFFFD#3\uFFFD", - "startTagXhtmlSpan": "\uFFFD#4\uFFFD" - }, { - original_code: { - "closeTagXhtmlDiv": "", - "closeTagXhtmlSpan": "", - "startTagXhtmlDiv": "", - "startTagXhtmlSpan": "" - } - }); - $I18N_0$ = $MSG_EXTERNAL_7128002169381370313$$APP_SPEC_TS_1$; - } - else { - $I18N_0$ = $localize `${"\uFFFD#3\uFFFD"}:START_TAG__XHTML_DIV: Count: ${"\uFFFD#4\uFFFD"}:START_TAG__XHTML_SPAN:5${"\uFFFD/#4\uFFFD"}:CLOSE_TAG__XHTML_SPAN:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG__XHTML_DIV:`; - } - return [ - ["xmlns", "http://www.w3.org/2000/svg"], - $i18n_0$, - ["xmlns", "http://www.w3.org/1999/xhtml"] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵnamespaceSVG(); - $r3$.ɵɵelementStart(0, "svg", 0)(1, "foreignObject"); - $r3$.ɵɵi18nStart(2, 1); - $r3$.ɵɵnamespaceHTML(); - $r3$.ɵɵelementStart(3, "div", 2); - $r3$.ɵɵelement(4, "span"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵi18nEnd(); - $r3$.ɵɵelementEnd()(); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/namespaced_div.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/namespaced_div.template.js deleted file mode 100644 index 1bbd0327bd797..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/namespaces/namespaced_div.template.js +++ /dev/null @@ -1,38 +0,0 @@ -consts: () => { - let $I18N_0$; - if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { - /** - * @suppress {msgDescriptions} - */ - const $MSG_EXTERNAL_7428861019045796010$$APP_SPEC_TS_1$ = goog.getMsg(" Count: {$startTagXhtmlSpan}5{$closeTagXhtmlSpan}", { - "closeTagXhtmlSpan": "\uFFFD/#4\uFFFD", - "startTagXhtmlSpan": "\uFFFD#4\uFFFD" - }, { - original_code: { - "closeTagXhtmlSpan": "", - "startTagXhtmlSpan": "" - } - }); - $I18N_0$ = $MSG_EXTERNAL_7428861019045796010$$APP_SPEC_TS_1$; - } - else { - $I18N_0$ = $localize ` Count: ${"\uFFFD#4\uFFFD"}:START_TAG__XHTML_SPAN:5${"\uFFFD/#4\uFFFD"}:CLOSE_TAG__XHTML_SPAN:`; - } - return [ - ["xmlns", "http://www.w3.org/2000/svg"], - ["xmlns", "http://www.w3.org/1999/xhtml"], - $i18n_0$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵnamespaceSVG(); - $r3$.ɵɵelementStart(0, "svg", 0)(1, "foreignObject"); - $r3$.ɵɵnamespaceHTML(); - $r3$.ɵɵelementStart(2, "div", 1); - $r3$.ɵɵi18nStart(3, 2); - $r3$.ɵɵelement(4, "span"); - $r3$.ɵɵi18nEnd(); - $r3$.ɵɵelementEnd()()(); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/TEST_CASES.json index e777c4cfb9546..fadb0ba213b0a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/TEST_CASES.json @@ -151,8 +151,7 @@ "files": [ { "generated": "nested_elements_with_i18n_attributes.js", - "expected": "nested_elements_with_i18n_attributes_template.js", - "templatePipelineExpected": "nested_elements_with_i18n_attributes_template.pipeline.js" + "expected": "nested_elements_with_i18n_attributes_template.pipeline.js" } ], "extraChecks": [ @@ -172,8 +171,7 @@ "files": [ { "generated": "nested_templates.js", - "expected": "nested_templates.template.js", - "templatePipelineExpected": "nested_templates.pipeline.js" + "expected": "nested_templates.pipeline.js" } ], "extraChecks": [ @@ -193,8 +191,7 @@ "files": [ { "generated": "self_closing.js", - "expected": "self_closing_template.js", - "templatePipelineExpected": "self_closing_template.pipeline.js" + "expected": "self_closing_template.pipeline.js" } ], "extraChecks": [ @@ -228,8 +225,7 @@ "files": [ { "generated": "directives.js", - "expected": "directives.template.js", - "templatePipelineExpected": "directives.pipeline.js" + "expected": "directives.pipeline.js" } ], "extraChecks": [ @@ -249,8 +245,7 @@ "files": [ { "generated": "event_listeners.js", - "expected": "event_listeners_template.js", - "templatePipelineExpected": "event_listeners_template.pipeline.js" + "expected": "event_listeners_template.pipeline.js" } ], "extraChecks": [ @@ -301,8 +296,7 @@ ], "files": [ { - "expected": "last_elem_inside_i18n_block_template.js", - "templatePipelineExpected": "last_elem_inside_i18n_block_template.pipeline.js", + "expected": "last_elem_inside_i18n_block_template.pipeline.js", "generated": "last_elem_inside_i18n_block.js" } ] diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/directives.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/directives.template.js deleted file mode 100644 index 27b1636efe8ee..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/directives.template.js +++ /dev/null @@ -1,33 +0,0 @@ -function MyComponent_div_0_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵi18nStart(1, 1); - $r3$.ɵɵelement(2, "span"); - $r3$.ɵɵi18nEnd(); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - const $ctx_r0$ = $r3$.ɵɵnextContext(); - $r3$.ɵɵadvance(2); - $r3$.ɵɵi18nExp($ctx_r0$.valueA); - $r3$.ɵɵi18nApply(1); - } -} -… -decls: 1, -vars: 1, -consts: () => { - __i18nMsg__('Some other content {$startTagSpan}{$interpolation}{$closeTagSpan}', [['closeTagSpan', String.raw`\uFFFD/#2\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startTagSpan', String.raw`\uFFFD#2\uFFFD`]], {original_code: {'closeTagSpan': '', 'interpolation': '{{ valueA }}', 'startTagSpan': '',}}, {}) - return [ - [__AttributeMarker.Template__, "ngIf"], - $i18n_0$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 3, 1, "div", 0); - } - if (rf & 2) { - $r3$.ɵɵproperty("ngIf", ctx.visible); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/event_listeners_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/event_listeners_template.js deleted file mode 100644 index 554a781298b63..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/event_listeners_template.js +++ /dev/null @@ -1,15 +0,0 @@ -consts: () => { - __i18nMsg__('Hello', [], {}, {}) - return [ - [__AttributeMarker.Bindings__, "click"], - $i18n_0$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div", 0); - $r3$.ɵɵlistener("click", function MyComponent_Template_div_click_0_listener() { return ctx.onClick(); }); - $r3$.ɵɵi18n(1, 1); - $r3$.ɵɵelementEnd(); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/last_elem_inside_i18n_block_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/last_elem_inside_i18n_block_template.js deleted file mode 100644 index 1d7204bb375b7..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/last_elem_inside_i18n_block_template.js +++ /dev/null @@ -1,28 +0,0 @@ -consts: () => { - __i18nMsg__('{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ attr }}'}}, {}) - __i18nMsg__('{$interpolation}{$startHeadingLevel1}{$closeHeadingLevel1}', [['closeHeadingLevel1', String.raw`\uFFFD/#2\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startHeadingLevel1', String.raw`\uFFFD#2\uFFFD`]], {original_code: { 'closeHeadingLevel1': '', 'interpolation': '{{ text }}', 'startHeadingLevel1': '

' }}, {}) - return [ - $i18n_0$, - [__AttributeMarker.I18n__, "title"], - ["title", $i18n_1$] - ]; - }, - template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - i0.ɵɵelementStart(0, "div"); - i0.ɵɵi18nStart(1, 0); - i0.ɵɵelementStart(2, "h1", 1); - i0.ɵɵi18nAttributes(3, 2); - i0.ɵɵelementEnd(); - i0.ɵɵi18nEnd(); - i0.ɵɵelementEnd(); - } - if (rf & 2) { - i0.ɵɵadvance(2); - i0.ɵɵi18nExp(ctx.attr); - i0.ɵɵi18nApply(3); - i0.ɵɵadvance(); - i0.ɵɵi18nExp(ctx.text); - i0.ɵɵi18nApply(1); - } - } diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/nested_elements_with_i18n_attributes_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/nested_elements_with_i18n_attributes_template.js deleted file mode 100644 index 2ab5cf38e9fe8..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/nested_elements_with_i18n_attributes_template.js +++ /dev/null @@ -1,48 +0,0 @@ -decls: 9, -vars: 7, -consts: () => { - __i18nMsg__('Span title {$interpolation} and {$interpolation_1}', [['interpolation', String.raw`\uFFFD0\uFFFD`], ['interpolation_1', String.raw`\uFFFD1\uFFFD`]], {original_code: {'interpolation': '{{ valueB }}', 'interpolation_1': '{{ valueC }}'}}, {}) - __i18nMsg__(' My i18n block #1 with value: {$interpolation} {$startTagSpan} Plain text in nested element (block #1) {$closeTagSpan}',[['closeTagSpan', String.raw`\uFFFD/#2\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startTagSpan', String.raw`\uFFFD#2\uFFFD`]], {original_code: {'closeTagSpan': '', 'interpolation': '{{ valueA }}', 'startTagSpan': ''}}, {}) - __i18nMsg__('Span title {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueE }}'}}, {}) - __i18nMsg__(' My i18n block #2 with value {$interpolation} {$startTagSpan} Plain text in nested element (block #2) {$closeTagSpan}',[['closeTagSpan', String.raw`\uFFFD/#7\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startTagSpan', String.raw`\uFFFD#7\uFFFD`]], {original_code: {'closeTagSpan': '', 'interpolation': '{{ valueD | uppercase }}', 'startTagSpan': ''}}, {}) - return [ - $i18n_0$, - [__AttributeMarker.I18n__, "title"], - ["title", $i18n_1$], - $i18n_2$, - ["title", $i18n_3$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵi18nStart(1, 0); - $r3$.ɵɵelementStart(2, "span", 1); - $r3$.ɵɵi18nAttributes(3, 2); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵi18nEnd(); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(4, "div"); - $r3$.ɵɵi18nStart(5, 3); - $r3$.ɵɵpipe(6, "uppercase"); - $r3$.ɵɵelementStart(7, "span", 1); - $r3$.ɵɵi18nAttributes(8, 4); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵi18nEnd(); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵadvance(2); - $r3$.ɵɵi18nExp(ctx.valueB)(ctx.valueC); - $r3$.ɵɵi18nApply(3); - $r3$.ɵɵadvance(); - $r3$.ɵɵi18nExp(ctx.valueA); - $r3$.ɵɵi18nApply(1); - $r3$.ɵɵadvance(4); - $r3$.ɵɵi18nExp(ctx.valueE); - $r3$.ɵɵi18nApply(8); - $r3$.ɵɵadvance(); - $r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(6, 5, ctx.valueD)); - $r3$.ɵɵi18nApply(5); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/nested_templates.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/nested_templates.template.js deleted file mode 100644 index 62dd7111aaf79..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/nested_templates.template.js +++ /dev/null @@ -1,38 +0,0 @@ -function MyComponent_div_2_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div")(1, "div"); - $r3$.ɵɵi18nStart(2, 1); - $r3$.ɵɵelement(3, "div"); - $r3$.ɵɵpipe(4, "uppercase"); - $r3$.ɵɵi18nEnd(); - $r3$.ɵɵelementEnd()(); - } - if (rf & 2) { - const $ctx_r0$ = $r3$.ɵɵnextContext(); - $r3$.ɵɵadvance(4); - $r3$.ɵɵi18nExp($ctx_r0$.valueA)($r3$.ɵɵpipeBind1(4, 2, $ctx_r0$.valueB)); - $r3$.ɵɵi18nApply(2); - } -} -… -decls: 3, -vars: 1, -consts: () => { - __i18nMsg__(' Some other content {$interpolation} {$startTagDiv} More nested levels with bindings {$interpolation_1} {$closeTagDiv}', [['closeTagDiv', String.raw`\uFFFD/#3\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['interpolation_1', String.raw`\uFFFD1\uFFFD`], ['startTagDiv', String.raw`\uFFFD#3\uFFFD`]], {original_code: {'closeTagDiv': '', 'interpolation': '{{ valueA }}', 'interpolation_1': '{{ valueB | uppercase }}', 'startTagDiv': '
'}}, {}) - return [ - [__AttributeMarker.Template__, "ngIf"], - $i18n_0$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵtext(1, " Some content "); - $r3$.ɵɵtemplate(2, MyComponent_div_2_Template, 5, 4, "div", 0); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵadvance(2); - $r3$.ɵɵproperty("ngIf", ctx.visible); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/self_closing_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/self_closing_template.js deleted file mode 100644 index 5cdf1c133c345..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/self_closing_template.js +++ /dev/null @@ -1,44 +0,0 @@ -function MyComponent_img_1_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelement(0, "img", 0); - } -} -… -function MyComponent_img_2_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "img", 3); - $r3$.ɵɵi18nAttributes(1, 4); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - const $ctx_r1$ = $r3$.ɵɵnextContext(); - $r3$.ɵɵi18nExp($ctx_r1$.id); - $r3$.ɵɵi18nApply(1); - } -} -… -decls: 3, -vars: 2, -consts: () => { - __i18nMsg__('App logo #{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ id }}'}}, {}) - return [ - ["src", "logo.png"], - ["src", "logo.png", __AttributeMarker.Template__, "ngIf"], - ["src", "logo.png", __AttributeMarker.Bindings__, "title", - __AttributeMarker.Template__, "ngIf"], - ["src", "logo.png", __AttributeMarker.I18n__, "title"], - ["title", $i18n_0$] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelement(0, "img", 0); - $r3$.ɵɵtemplate(1, MyComponent_img_1_Template, 1, 0, "img", 1)(2, MyComponent_img_2_Template, 2, 1, "img", 2); - } - if (rf & 2) { - $r3$.ɵɵadvance(); - $r3$.ɵɵproperty("ngIf", ctx.visible); - $r3$.ɵɵadvance(); - $r3$.ɵɵproperty("ngIf", ctx.visible); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/TEST_CASES.json index c7a1cd114a542..ff1e021360d95 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/TEST_CASES.json @@ -95,8 +95,7 @@ "files": [ { "generated": "self_closing_tags.js", - "expected": "self_closing_tags.template.js", - "templatePipelineExpected": "self_closing_tags.pipeline.js" + "expected": "self_closing_tags.pipeline.js" } ], "extraChecks": [ @@ -170,8 +169,7 @@ "files": [ { "generated": "structural_directives.js", - "expected": "structural_directives.template.js", - "templatePipelineExpected": "structural_directives.pipeline.js" + "expected": "structural_directives.pipeline.js" } ], "extraChecks": [ diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/self_closing_tags.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/self_closing_tags.template.js deleted file mode 100644 index 0e402acadabbe..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/self_closing_tags.template.js +++ /dev/null @@ -1,27 +0,0 @@ -function MyComponent_ng_template_3_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵi18nStart(0, 2); - $r3$.ɵɵelement(1, "img", 1); - $r3$.ɵɵi18nEnd(); - } -} -… -consts: () => { - __i18nMsg__('{$tagImg} is my logo #1 ', [['tagImg', String.raw`\uFFFD#2\uFFFD\uFFFD/#2\uFFFD`]], {original_code: {tagImg: ''}}, {}) - __i18nMsg__('{$tagImg} is my logo #2 ', [['tagImg', String.raw`\uFFFD#1\uFFFD\uFFFD/#1\uFFFD`]], {original_code: {tagImg: ''}}, {}) - return [ - $i18n_0$, - ["src", "logo.png", "title", "Logo"], - $i18n_1$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementContainerStart(0); - $r3$.ɵɵi18nStart(1, 0); - $r3$.ɵɵelement(2, "img", 1); - $r3$.ɵɵi18nEnd(); - $r3$.ɵɵelementContainerEnd(); - $r3$.ɵɵtemplate(3, MyComponent_ng_template_3_Template, 2, 0, "ng-template"); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/structural_directives.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/structural_directives.template.js deleted file mode 100644 index c80d77e91e983..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/ng-container_ng-template/structural_directives.template.js +++ /dev/null @@ -1,41 +0,0 @@ -// NOTE: applying structural directives to is typically user error, but it is technically allowed, so we need to support it. -function MyComponent_0_ng_template_0_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵi18n(0, 1); - } -} -function MyComponent_0_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_0_ng_template_0_Template, 1, 0, "ng-template"); - } -} -… -function MyComponent_ng_container_1_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementContainerStart(0); - $r3$.ɵɵi18n(1, 2); - $r3$.ɵɵelementContainerEnd(); - } -} -… -decls: 2, -vars: 2, -consts: () => { - __i18nMsg__('Content A', [], {}, {}) - __i18nMsg__('Content B', [], {}, {}) - return [ - [__AttributeMarker.Template__, "ngIf"], - $i18n_0$, - $i18n_1$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵtemplate(0, MyComponent_0_Template, 1, 0, null, 0)(1, MyComponent_ng_container_1_Template, 2, 0, "ng-container", 0); - } - if (rf & 2) { - $r3$.ɵɵproperty("ngIf", ctx.someFlag); - $r3$.ɵɵadvance(); - $r3$.ɵɵproperty("ngIf", ctx.someFlag); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/TEST_CASES.json index 7166cccbb3ffe..35cd62939de38 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/TEST_CASES.json @@ -53,8 +53,7 @@ "files": [ { "generated": "styles.js", - "expected": "styles.template.js", - "templatePipelineExpected": "styles.pipeline.js" + "expected": "styles.pipeline.js" } ], "extraChecks": [ diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/styles.template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/styles.template.js deleted file mode 100644 index 5d5071dea0b75..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/styles.template.js +++ /dev/null @@ -1,22 +0,0 @@ -decls: 4, -vars: 0, -consts: () => { - __i18nMsg__('Text #1', [], {}, {}) - __i18nMsg__('Text #2', [], {}, {}) - return [ - [__AttributeMarker.Classes__, "myClass"], - $i18n_0$, - [__AttributeMarker.Styles__, "padding", "10px"], - $i18n_1$ - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "span", 0); - $r3$.ɵɵi18n(1, 1); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelementStart(2, "span", 2); - $r3$.ɵɵi18n(3, 3); - $r3$.ɵɵelementEnd(); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/TEST_CASES.json index 645c2d29400d6..6daf5fc2ddf8f 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/TEST_CASES.json @@ -61,8 +61,7 @@ { "files": [ { - "expected": "local_ref_before_listener_template.js", - "templatePipelineExpected": "local_ref_before_listener.pipeline.js", + "expected": "local_ref_before_listener.pipeline.js", "generated": "local_ref_before_listener.js" } ], @@ -291,8 +290,7 @@ { "files": [ { - "expected": "embedded_view_listener_context_template.js", - "templatePipelineExpected": "embedded_view_listener_context_template.pipeline.js", + "expected": "embedded_view_listener_context_template.pipeline.js", "generated": "embedded_view_listener_context.js" } ], diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/embedded_view_listener_context_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/embedded_view_listener_context_template.js deleted file mode 100644 index 8fb9a64ff01f5..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/embedded_view_listener_context_template.js +++ /dev/null @@ -1,13 +0,0 @@ -function MyComponent_ng_template_0_Template(rf, $ctx$) { - if (rf & 1) { - const $_r3$ = $i0$.ɵɵgetCurrentView(); - $i0$.ɵɵelementStart(0, "button", 0); - $i0$.ɵɵlistener("click", function MyComponent_ng_template_0_Template_button_click_0_listener() { - const $restoredCtx$ = $i0$.ɵɵrestoreView($_r3$); - const $obj_r1$ = $restoredCtx$.$implicit; - return $i0$.ɵɵresetView($obj_r1$.value = 1); - }); - $i0$.ɵɵtext(1, "Change"); - $i0$.ɵɵelementEnd(); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/local_ref_before_listener_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/local_ref_before_listener_template.js deleted file mode 100644 index beb1cedf820e7..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_listener/local_ref_before_listener_template.js +++ /dev/null @@ -1,23 +0,0 @@ -… -MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ - type: MyComponent, - selectors: [["my-component"]], - decls: 4, - vars: 0, - consts: [[__AttributeMarker.Bindings__, "click"], ["user", ""]], - template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - const $s$ = $r3$.ɵɵgetCurrentView(); - $r3$.ɵɵelementStart(0, "button", 0); - $r3$.ɵɵlistener("click", function MyComponent_Template_button_click_0_listener() { - $r3$.ɵɵrestoreView($s$); - const $user$ = $r3$.ɵɵreference(3); - return $r3$.ɵɵresetView(ctx.onClick($user$.value)); - }); - $r3$.ɵɵtext(1, "Save"); - $r3$.ɵɵelementEnd(); - $r3$.ɵɵelement(2, "input", null, 1); - } - }, - encapsulation: 2 -}); diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/TEST_CASES.json index ca8b443f2293b..1cb564d45d3fa 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/TEST_CASES.json @@ -80,8 +80,7 @@ { "files": [ { - "templatePipelineExpected": "shared_name_with_consts_template.pipeline.js", - "expected": "shared_name_with_consts_template.js", + "expected": "shared_name_with_consts_template.pipeline.js", "generated": "shared_name_with_consts.js" } ], diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/shared_name_with_consts_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/shared_name_with_consts_template.js deleted file mode 100644 index db5c8e4855ae6..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/class_bindings/shared_name_with_consts_template.js +++ /dev/null @@ -1,30 +0,0 @@ -consts: () => { - __i18nMsg__('label', [], {}, {}) - return [ - ["attr", "", __AttributeMarker.Classes__, "attr"], - ["ngProjectAs", "selector", __AttributeMarker.ProjectAs__, ["selector"], __AttributeMarker.Classes__, "selector"], - [__AttributeMarker.Classes__, "width", __AttributeMarker.Styles__, "width", "0px"], - [__AttributeMarker.Classes__, "tabindex", __AttributeMarker.Bindings__, "tabindex"], - ["class", "ngIf", __AttributeMarker.Template__, "ngIf"], - ["aria-label", i18n_0, __AttributeMarker.Classes__, "aria-label"], - ["all", "", "ngProjectAs", "all", "style", "all:all", "class", "all", __AttributeMarker.ProjectAs__, ["all"], __AttributeMarker.Bindings__, "all", __AttributeMarker.Template__], - [__AttributeMarker.Classes__, "ngIf"], - ["all", "", "ngProjectAs", "all", __AttributeMarker.ProjectAs__, ["all"], __AttributeMarker.Classes__, "all", __AttributeMarker.Styles__, "all", "all", __AttributeMarker.Bindings__, "all"] - ]; -}, -template: function MyComponent_Template(rf, ctx) { - if (rf & 1) { - i0.ɵɵelement(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3); - i0.ɵɵtemplate(4, MyComponent_div_4_Template, 1, 0, "div", 4); - i0.ɵɵelement(5, "div", 5); - i0.ɵɵtemplate(6, MyComponent_div_6_Template, 1, 1, "div", 6); - } - if (rf & 2) { - i0.ɵɵadvance(3); - i0.ɵɵproperty("tabindex", ctx.tabIndex); - i0.ɵɵadvance(); - i0.ɵɵproperty("ngIf", ctx.cond); - i0.ɵɵadvance(2); - i0.ɵɵproperty("all", ctx.all); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/TEST_CASES.json index c6e627a237b49..8e026b5f5350a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/TEST_CASES.json @@ -18,8 +18,7 @@ { "failureMessage": "Incorrect template", "files": [{ - "expected": "pipe_bindings_template.js", - "templatePipelineExpected": "pipe_bindings.pipeline.js", + "expected": "pipe_bindings.pipeline.js", "generated": "pipe_bindings.js" }] } diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings_template.js deleted file mode 100644 index 8820feecade90..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings_template.js +++ /dev/null @@ -1,12 +0,0 @@ -template: function MyComponent_Template(rf, $ctx$) { - if (rf & 1) { - $r3$.ɵɵelementStart(0, "div"); - $r3$.ɵɵpipe(1, "stylePipe"); - $r3$.ɵɵpipe(2, "classPipe"); - $r3$.ɵɵelementEnd(); - } - if (rf & 2) { - $r3$.ɵɵstyleMap($r3$.ɵɵpipeBind1(1, 4, $ctx$.myStyleExp)); - $r3$.ɵɵclassMap($r3$.ɵɵpipeBind1(2, 6, $ctx$.myClassExp)); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/TEST_CASES.json index 55df8b8385b71..4dd2c95088490 100644 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/TEST_CASES.json @@ -10,8 +10,7 @@ { "files": [ { - "expected": "nested_template_context_template.js", - "templatePipelineExpected": "nested_template_context.pipeline.js", + "expected": "nested_template_context.pipeline.js", "generated": "nested_template_context.js" } ], @@ -79,8 +78,7 @@ { "files": [ { - "expected": "ng_for_parent_context_variables_template.js", - "templatePipelineExpected": "ng_for_parent_context_variables.pipeline.js", + "expected": "ng_for_parent_context_variables.pipeline.js", "generated": "ng_for_parent_context_variables.js" } ], diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/nested_template_context_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/nested_template_context_template.js deleted file mode 100644 index d9c2926d40374..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/nested_template_context_template.js +++ /dev/null @@ -1,66 +0,0 @@ -function MyComponent_ul_0_li_1_div_1_Template(rf, ctx) { - if (rf & 1) { - const $s$ = $i0$.ɵɵgetCurrentView(); - $i0$.ɵɵelementStart(0, "div", 2); - $i0$.ɵɵlistener("click", function MyComponent_ul_0_li_1_div_1_Template_div_click_0_listener(){ - const $sr$ = $i0$.ɵɵrestoreView($s$); - const $inner$ = $sr$.$implicit; - const $middle$ = $i0$.ɵɵnextContext().$implicit; - const $outer$ = $i0$.ɵɵnextContext().$implicit; - const $myComp$ = $i0$.ɵɵnextContext(); - return $i0$.ɵɵresetView($myComp$.onClick($outer$, $middle$, $inner$)); - }); - $i0$.ɵɵtext(1); - $i0$.ɵɵelementEnd(); - } - - if (rf & 2) { - const $inner1$ = ctx.$implicit; - const $middle1$ = $i0$.ɵɵnextContext().$implicit; - const $outer1$ = $i0$.ɵɵnextContext().$implicit; - const $myComp1$ = $i0$.ɵɵnextContext(); - $i0$.ɵɵproperty("title", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component)); - $r3$.ɵɵadvance(); - $i0$.ɵɵtextInterpolate1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " "); - } -} - -function MyComponent_ul_0_li_1_Template(rf, ctx) { - if (rf & 1) { - $i0$.ɵɵelementStart(0, "li"); - $i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_div_1_Template, 2, 2, "div", 1); - $i0$.ɵɵelementEnd(); - } - if (rf & 2) { - const $myComp2$ = $i0$.ɵɵnextContext(2); - $r3$.ɵɵadvance(); - $i0$.ɵɵproperty("ngForOf", $myComp2$.items); - } -} - -function MyComponent_ul_0_Template(rf, ctx) { - if (rf & 1) { - $i0$.ɵɵelementStart(0, "ul"); - $i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_Template, 2, 1, "li", 0); - $i0$.ɵɵelementEnd(); - } - if (rf & 2) { - const $outer2$ = ctx.$implicit; - $r3$.ɵɵadvance(); - $i0$.ɵɵproperty("ngForOf", $outer2$.items); - } -} -… -consts: [ - [__AttributeMarker.Template__, "ngFor", "ngForOf"], - [__AttributeMarker.Bindings__, "title", "click", __AttributeMarker.Template__, "ngFor", "ngForOf"], - [__AttributeMarker.Bindings__, "title", "click"] -], -template:function MyComponent_Template(rf, ctx){ - if (rf & 1) { - $i0$.ɵɵtemplate(0, MyComponent_ul_0_Template, 2, 1, "ul", 0); - } - if (rf & 2) { - $i0$.ɵɵproperty("ngForOf", ctx.items); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/ng_for_parent_context_variables_template.js b/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/ng_for_parent_context_variables_template.js deleted file mode 100644 index 0fa6f93f91369..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_template/ng_for_parent_context_variables_template.js +++ /dev/null @@ -1,41 +0,0 @@ -function MyComponent_div_0_span_1_Template(rf, ctx) { - if (rf & 1) { - $i0$.ɵɵelementStart(0, "span"); - $i0$.ɵɵtext(1); - $i0$.ɵɵelementEnd(); - } - if (rf & 2) { - const $div$ = $i0$.ɵɵnextContext(); - const $i$ = $div$.index; - const $item$ = $div$.$implicit; - $r3$.ɵɵadvance(); - $i0$.ɵɵtextInterpolate2(" ", $i$, " - ", $item$, " "); - } -} - -function MyComponent_div_0_Template(rf, ctx) { - if (rf & 1) { - $i0$.ɵɵelementStart(0, "div"); - $i0$.ɵɵtemplate(1, MyComponent_div_0_span_1_Template, 2, 2, "span", 1); - $i0$.ɵɵelementEnd(); - } - if (rf & 2) { - const $app$ = $i0$.ɵɵnextContext(); - $r3$.ɵɵadvance(); - $i0$.ɵɵproperty("ngIf", $app$.showing); - } -} - -… -consts: [ - [__AttributeMarker.Template__, "ngFor", "ngForOf"], - [__AttributeMarker.Template__, "ngIf"] -], -template:function MyComponent_Template(rf, ctx){ - if (rf & 1) { - $i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 2, 1, "div", 0); - } - if (rf & 2) { - $i0$.ɵɵproperty("ngForOf", ctx.items); - } -} diff --git a/packages/compiler-cli/test/compliance/test_cases/replace.sh b/packages/compiler-cli/test/compliance/test_cases/replace.sh new file mode 100755 index 0000000000000..686f3c76e568e --- /dev/null +++ b/packages/compiler-cli/test/compliance/test_cases/replace.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# Step 1: Find all .pipeline.js files recursively +find . -type f -name "*.pipeline.js" | while read -r pipeline_file; do + base_dir=$(dirname "$pipeline_file") + base_name=$(basename "$pipeline_file" .pipeline.js) + + # Step 2: Attempt to delete the corresponding .js, .template.js, or _template.js file + js_file="${base_dir}/${base_name}.js" + template_js_file="${base_dir}/${base_name}.template.js" + underscore_template_js_file="${base_dir}/${base_name}_template.js" + + file_deleted=false + + if [ -f "$js_file" ]; then + rm "$js_file" && echo "Deleted file: $js_file" + file_deleted=true + fi + if [ -f "$template_js_file" ]; then + rm "$template_js_file" && echo "Deleted file: $template_js_file" + file_deleted=true + fi + if [ -f "$underscore_template_js_file" ]; then + rm "$underscore_template_js_file" && echo "Deleted file: $underscore_template_js_file" + file_deleted=true + fi + + if [ "$file_deleted" = false ]; then + echo "Error: Corresponding file for $pipeline_file not found." + fi + + # Step 3: Modify TEST_CASES.json if it exists in the same directory + test_cases_file="${base_dir}/TEST_CASES.json" + if [ -f "$test_cases_file" ]; then + # Patterns to match "expected" before the filename + js_pattern="expected.*$base_name\.js" + template_js_pattern="expected.*$base_name\.template\.js" + underscore_template_js_pattern="expected.*$base_name\_template\.js" + + # Use a more compatible sed in-place editing command + if grep -q -E "expected.*(js|template\.js|_template\.js)" "$test_cases_file"; then + # Determine if we are using GNU sed or BSD sed and adjust the command accordingly + if sed --version 2>/dev/null | grep -q GNU; then + # GNU sed + sed -i "/$js_pattern/d" "$test_cases_file" + sed -i "/$template_js_pattern/d" "$test_cases_file" + sed -i "/$underscore_template_js_pattern/d" "$test_cases_file" + else + # BSD sed + sed -i '' "/$js_pattern/d" "$test_cases_file" + sed -i '' "/$template_js_pattern/d" "$test_cases_file" + sed -i '' "/$underscore_template_js_pattern/d" "$test_cases_file" + fi + echo "Modified $test_cases_file to remove references to ${base_name}.js, ${base_name}.template.js, and/or ${base_name}_template.js with 'expected' preceding" + else + echo "Error: No line found in $test_cases_file for 'expected' preceding ${base_name}.js, ${base_name}.template.js, or ${base_name}_template.js" + fi + else + echo "Error: TEST_CASES.json not found in $base_dir" + fi +done diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/TEST_CASES.json b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/TEST_CASES.json index a8f1f60445fe7..8caed2dceaf84 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/TEST_CASES.json +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/TEST_CASES.json @@ -794,8 +794,7 @@ "files": [ { "generated": "i18n_message_interpolation_whitespace.js", - "expected": "i18n_message_interpolation_whitespace_template.js", - "templatePipelineExpected": "i18n_message_interpolation_whitespace_template.pipeline.js" + "expected": "i18n_message_interpolation_whitespace_template.pipeline.js" } ] } @@ -818,8 +817,7 @@ "files": [ { "generated": "i18n_message_interpolation_whitespace.js", - "expected": "i18n_message_interpolation_whitespace_partial_template.js", - "templatePipelineExpected": "i18n_message_interpolation_whitespace_partial_template.pipeline.js" + "expected": "i18n_message_interpolation_whitespace_partial_template.pipeline.js" } ] } diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_partial_template.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_partial_template.js deleted file mode 100644 index 169ab74007d8b..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_partial_template.js +++ /dev/null @@ -1,12 +0,0 @@ -$localize ` pre-title ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{titleValue}}" -}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-title\" i18n-title>" -… -$localize ` pre-body ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{bodyValue}}" -}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-body" -… -.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts" "
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_template.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_template.js deleted file mode 100644 index 35af820d2a679..0000000000000 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_template.js +++ /dev/null @@ -1,11 +0,0 @@ -$localize ` pre-title ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{titleValue}}" -}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-title" -… -$localize ` pre-body ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{bodyValue}}" -}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-body" -… -i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/test_case_schema.json b/packages/compiler-cli/test/compliance/test_cases/test_case_schema.json index b0f4912f05ad5..04f0ca988a1c9 100644 --- a/packages/compiler-cli/test/compliance/test_cases/test_case_schema.json +++ b/packages/compiler-cli/test/compliance/test_cases/test_case_schema.json @@ -61,10 +61,6 @@ "title": "A path (relative to the test case) where a file containing expected output can be found", "type": "string" }, - "templatePipelineExpected": { - "title": "A path (relative to the test case) where a file containing alternate expected output for the template pipeline can be found", - "type": "string" - }, "generated": { "title": "A path (relative to the build output directory) where the compiled file can be found.", "type": "string" diff --git a/packages/compiler-cli/test/compliance/test_helpers/get_compliance_tests.ts b/packages/compiler-cli/test/compliance/test_helpers/get_compliance_tests.ts index bf2c08777d964..da7d58d10ac2e 100644 --- a/packages/compiler-cli/test/compliance/test_helpers/get_compliance_tests.ts +++ b/packages/compiler-cli/test/compliance/test_helpers/get_compliance_tests.ts @@ -271,8 +271,6 @@ export interface Expectation { export interface ExpectedFile { expected: string; generated: string; - /** Alternate expected file when compiling with the template pipeline. */ - templatePipelineExpected?: string; } /** diff --git a/packages/compiler-cli/test/compliance/test_helpers/test_runner.ts b/packages/compiler-cli/test/compliance/test_helpers/test_runner.ts index 6f76c7b1d917b..64cea8d2b7a8f 100644 --- a/packages/compiler-cli/test/compliance/test_helpers/test_runner.ts +++ b/packages/compiler-cli/test/compliance/test_helpers/test_runner.ts @@ -13,18 +13,17 @@ import {CompileResult, initMockTestFileSystem} from './compile_test'; import {CompilationMode, ComplianceTest, Expectation, getAllComplianceTests} from './get_compliance_tests'; function transformExpectation(expectation: Expectation, isLocalCompilation: boolean): void { - expectation.files = - expectation.files.map(pair => ({ - expected: pair.templatePipelineExpected || pair.expected, - generated: pair.generated, - })); + expectation.files = expectation.files.map(pair => ({ + expected: pair.expected, + generated: pair.generated, + })); if (isLocalCompilation) { - expectation.files = expectation.files.map( - pair => ({ - expected: getFilenameForLocalCompilation(pair.templatePipelineExpected || pair.expected), - generated: pair.generated, - })); + expectation.files = + expectation.files.map(pair => ({ + expected: getFilenameForLocalCompilation(pair.expected), + generated: pair.generated, + })); } }