test(compiler-cli): clarify source-map expectations in compliance tests (#42062)

The compliance tests can check source-map segments against expectations
encoded into the expectation files. Previously, the encoding of the expected
segment was only delimited by whitespace, but this made it difficult to identify
segments that started or ended with whitespace.

Now these segment expectations are wrapped in double-quotes which makes
it easier to read and understand the expectation files.

PR Close #42062
This commit is contained in:
Pete Bacon Darwin 2021-05-20 11:17:39 +01:00 committed by atscott
parent 42265cca1c
commit 29f9888a98
62 changed files with 255 additions and 254 deletions

View File

@ -131,7 +131,7 @@ are intelligently matched to check whether they are equivalent.
To check a mapping, add a `// SOURCE:` comment to the end of a line in an expectation file:
```
<generated code> // SOURCE: "<source-url>" <source code>
<generated code> // SOURCE: "<source-url>" "<source code>"
```
The generated code, stripped of the `// SOURCE: ` comment, will still be checked as normal by the
@ -144,6 +144,7 @@ Note:
to be `/`.
* Whitespace is important and will be included when comparing the segments.
* There is a single space character between each part of the line.
* Double quotes in the mapping must be escaped.
* Newlines within a mapping must be escaped since the mapping and comment must all appear on a
single line of this file.

View File

@ -1,6 +1,6 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html" <div>
i0.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html" "<div>"
// NOTE: the `\\r\\n` at the end of the next line will be unescaped to `\r\n`. If it was just `\r\n` it would get unescaped to the actual characters.
i0.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" Some Message\r\n Encoded character: 🚀\\r\\n
i0.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" "Some Message\r\n Encoded character: 🚀\r\n"
i0.ɵɵelementEnd() // SOURCE: "/escaped_chars.html" </div>
i0.ɵɵelementEnd() // SOURCE: "/escaped_chars.html" "</div>"

View File

@ -1,6 +1,6 @@
.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html" <div>\r\n
.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html" "<div>\r\n "
// NOTE: the `\\r\\n` at the end of the next line will be unescaped to `\r\n`. If it was just `\r\n` it would get unescaped to the actual characters.
.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" Some Message\r\n Encoded character: 🚀\\r\\n
.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" "Some Message\r\n Encoded character: 🚀\\r\\n"
.ɵɵelementEnd() // SOURCE: "/escaped_chars.html" </div>
.ɵɵelementEnd() // SOURCE: "/escaped_chars.html" "</div>"

View File

@ -1,13 +1,13 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html" <div>
i0.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html" "<div>"
i0.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" this is a test
i0.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" "this is a test"
i0.ɵɵelementEnd() // SOURCE: "/dir/test.html" </div>
i0.ɵɵelementEnd() // SOURCE: "/dir/test.html" "</div>"
i0.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html" <div>
i0.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html" "<div>"
i0.ɵɵtext(3) // SOURCE: "/dir/test.html" {{ 1 + 2 }}
i0.ɵɵtext(3) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}"
i0.ɵɵelementEnd() // SOURCE: "/dir/test.html" </div>
i0.ɵɵelementEnd() // SOURCE: "/dir/test.html" "</div>"
i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" {{ 1 + 2 }}
i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}"

View File

@ -1,14 +1,14 @@
.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html" <div>
.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html" "<div>"
.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" this is a test
.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" "this is a test"
.ɵɵelementEnd() // SOURCE: "/dir/test.html" </div>\n
.ɵɵelementEnd() // SOURCE: "/dir/test.html" "</div>\n"
.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html" <div>
.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html" "<div>"
.ɵɵtext(3) // SOURCE: "/dir/test.html" {{ 1 + 2 }}
.ɵɵtext(3) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelementEnd() // SOURCE: "/dir/test.html" </div>
.ɵɵelementEnd() // SOURCE: "/dir/test.html" "</div>"
.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" {{ 1 + 2 }}
.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}"

View File

@ -1,13 +1,13 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html" <div>
i0.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html" "<div>"
i0.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" this is a test
i0.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" "this is a test"
i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" </div>
i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "</div>"
i0.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html" <div>
i0.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html" "<div>"
i0.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }}
i0.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}"
i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" </div>
i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "</div>"
i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }}
i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}"

View File

@ -1,13 +1,13 @@
.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html" <div>
.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html" "<div>"
.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" this is a test
.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" "this is a test"
.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" </div>\n
.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "</div>\n"
.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html" <div>
.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html" "<div>"
.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }}
.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}"
.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" </div>
.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "</div>"
.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }}
.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}"

View File

@ -1,3 +1,3 @@
consts: [[1, "some-class"]]
i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts" <div class=\"some-class\">
i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts" "<div class=\\"some-class\\">"

View File

@ -1,3 +1,3 @@
consts: [[1, "some-class"]]
.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts" <div class=\"some-class\">
.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts" "<div class=\\"some-class\\">"

View File

@ -1,13 +1,13 @@
`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" Hello,
`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" "Hello, "
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" <b>
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "<b>"
}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" World
}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" "World"
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" </b>
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "</b>"
}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" !
}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" "!"
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts" <div i18n>
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts" "<div i18n>"
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_container_tag.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_container_tag.ts" "</div>"

View File

@ -1,14 +1,14 @@
$localize`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" Hello,
$localize`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" "Hello, "
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" <b>
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "<b>"
}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" World
}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" "World"
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" </b>
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "</b>"
}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" !
}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" "!"
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts" <div i18n>
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts" "<div i18n>"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelem // SOURCE: "/i18n_message_container_tag.ts" </div>'
.ɵɵelem // SOURCE: "/i18n_message_container_tag.ts" "</div>'"

View File

@ -1,20 +1,20 @@
` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" pre-p\\n
` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "pre-p\\n "
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" <p>\\n
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "<p>\\n "
}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" in-p\\n
}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "in-p\\n "
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" </p>
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "</p>"
}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" post-p\\n
}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" "post-p\\n"
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts" <div i18n>
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts" "<div i18n>"
i0.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts" <div i18n>
i0.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts" "<div i18n>"
i0.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts" <p>\\n
i0.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts" "<p>\\n "
i0.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts" </div>
i0.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts" "</div>"
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_element_whitespace.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_element_whitespace.ts" "</div>"

View File

@ -1,21 +1,21 @@
$localize` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" pre-p\\n
$localize` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "pre-p\\n "
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" <p>\\n
"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "<p>\\n "
}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" in-p\\n
}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "in-p\\n "
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" </p>\\n
"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "</p>\\n "
}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" post-p\\n
}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" "post-p\\n"
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts" <div i18n>\\n
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts" "<div i18n>\\n "
.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts" <div i18n>\\n
.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts" "<div i18n>\\n "
.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts" <p>\\n
.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts" "<p>\\n "
.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts" </div>'
.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts" "</div>'"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelem // SOURCE: "/i18n_message_element_whitespace.ts" </div>'
.ɵɵelem // SOURCE: "/i18n_message_element_whitespace.ts" "</div>'"

View File

@ -1,11 +1,11 @@
$localize ` pre-title ${
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" {{titleValue}}
}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" post-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
"\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" <div i18n title="
i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts" "<div i18n title=\""
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" "</div>"

View File

@ -1,12 +1,12 @@
$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>
"\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
"\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" <div i18n title="
.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts" "<div i18n title=\""
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" </div>'
.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" "</div>'"

View File

@ -1,9 +1,9 @@
`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" Hello,
`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" "Hello, "
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" {{name}}
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" "{{name}}"
}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" !
}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" "!"
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts" <div i18n>
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts" "<div i18n>"
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts" "</div>"

View File

@ -1,9 +1,9 @@
$localize`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" Hello,
$localize`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" "Hello, "
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" {{name}}
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" "{{name}}"
}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" !
}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" "!"
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts" <div i18n>
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts" "<div i18n>"
.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts" </div>'
.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts" "</div>'"

View File

@ -1,3 +1,3 @@
`Hello, World!` // SOURCE: "/i18n_message_simple.ts" Hello, World!
`Hello, World!` // SOURCE: "/i18n_message_simple.ts" "Hello, World!"
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts" <div i18n>
i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts" "<div i18n>"

View File

@ -1,3 +1,3 @@
$localize`Hello, World!` // SOURCE: "/i18n_message_simple.ts" Hello, World!
$localize`Hello, World!` // SOURCE: "/i18n_message_simple.ts" "Hello, World!"
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts" <div i18n>
.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts" "<div i18n>"

View File

@ -1,7 +1,7 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/input_binding_class.ts" <div
i0.ɵɵelementStart(0, "div") // SOURCE: "/input_binding_class.ts" "<div "
i0.ɵɵtext(1, "Message") // SOURCE: "/input_binding_class.ts" Message
i0.ɵɵtext(1, "Message") // SOURCE: "/input_binding_class.ts" "Message"
i0.ɵɵelementEnd() // SOURCE: "/input_binding_class.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/input_binding_class.ts" "</div>"
i0.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" [class.initial]="isInitial"
i0.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" "[class.initial]=\"isInitial\""

View File

@ -1,7 +1,7 @@
.ɵɵelementStart(0, "div") // SOURCE: "/input_binding_class.ts" <div
.ɵɵelementStart(0, "div") // SOURCE: "/input_binding_class.ts" "<div "
.ɵɵtext(1, "Message") // SOURCE: "/input_binding_class.ts" Message
.ɵɵtext(1, "Message") // SOURCE: "/input_binding_class.ts" "Message"
.ɵɵelem // SOURCE: "/input_binding_class.ts" </div>'
.ɵɵelem // SOURCE: "/input_binding_class.ts" "</div>'"
.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" [class.initial]="isInitial">
.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" "[class.initial]=\"isInitial\">"

View File

@ -1,3 +1,3 @@
i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_complex.ts" <div
i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_complex.ts" "<div "
i0.ɵɵproperty("title", ctx.greeting + ctx.name) // SOURCE: "/input_binding_complex.ts" [title]="greeting + name"
i0.ɵɵproperty("title", ctx.greeting + ctx.name) // SOURCE: "/input_binding_complex.ts" "[title]=\"greeting + name\""

View File

@ -1,4 +1,4 @@
.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_complex.ts" <div
.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_complex.ts" "<div "
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵproperty("title", ctx.greeting // SOURCE: "/input_binding_complex.ts" [title]="greeting + name"></div>'
.ɵɵproperty("title", ctx.greeting // SOURCE: "/input_binding_complex.ts" "[title]=\"greeting + name\"></div>'"

View File

@ -1,3 +1,3 @@
i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_longhand.ts" <div
i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_longhand.ts" "<div "
i0.ɵɵproperty("title", ctx.name) // SOURCE: "/input_binding_longhand.ts" bind-title="name"
i0.ɵɵproperty("title", ctx.name) // SOURCE: "/input_binding_longhand.ts" "bind-title=\"name\""

View File

@ -1,4 +1,4 @@
.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_longhand.ts" <div
.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_longhand.ts" "<div "
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵproperty("title", ctx. // SOURCE: "/input_binding_longhand.ts" bind-title="name"></div>'
.ɵɵproperty("title", ctx. // SOURCE: "/input_binding_longhand.ts" "bind-title=\"name\"></div>'"

View File

@ -1,3 +1,3 @@
i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_simple.ts" <div
i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_simple.ts" "<div "
i0.ɵɵproperty("title", ctx.name) // SOURCE: "/input_binding_simple.ts" [title]="name"
i0.ɵɵproperty("title", ctx.name) // SOURCE: "/input_binding_simple.ts" "[title]=\"name\""

View File

@ -1,4 +1,4 @@
.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_simple.ts" <div
.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_simple.ts" "<div "
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵproperty("title", c // SOURCE: "/input_binding_simple.ts" [title]="name"></div>'
.ɵɵproperty("title", c // SOURCE: "/input_binding_simple.ts" "[title]=\"name\"></div>'"

View File

@ -1,5 +1,5 @@
i0.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts" <h3>
i0.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts" "<h3>"
i0.ɵɵelementEnd() // SOURCE: "/interpolation_basic.ts" </h3>
i0.ɵɵelementEnd() // SOURCE: "/interpolation_basic.ts" "</h3>"
i0.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }}
i0.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" "Hello {{ name }}"

View File

@ -1,6 +1,6 @@
.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts" <h3>
.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts" "<h3>"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵele // SOURCE: "/interpolation_basic.ts" </h3>'
.ɵɵele // SOURCE: "/interpolation_basic.ts" "</h3>'"
.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }}
.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" "Hello {{ name }}"

View File

@ -1,5 +1,5 @@
i0.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" <h2>
i0.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" "<h2>"
i0.ɵɵelementEnd() // SOURCE: "/interpolation_complex.ts" </h2>
i0.ɵɵelementEnd() // SOURCE: "/interpolation_complex.ts" "</h2>"
i0.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }}
i0.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" "{{ greeting + \" \" + name }}"

View File

@ -1,6 +1,6 @@
.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" <h2>
.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" "<h2>"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵele // SOURCE: "/interpolation_complex.ts" </h2>'
.ɵɵele // SOURCE: "/interpolation_complex.ts" "</h2>'"
.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }}
.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" "{{ greeting + \" \" + name }}"

View File

@ -1,3 +1,3 @@
i0.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts" <div
i0.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts" "<div "
i0.ɵɵpropertyInterpolate("id", ctx.name) // SOURCE: "/interpolation_properties.ts" id="{{name}}"
i0.ɵɵpropertyInterpolate("id", ctx.name) // SOURCE: "/interpolation_properties.ts" "id=\"{{name}}\""

View File

@ -1,4 +1,4 @@
.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts" <div
.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts" "<div "
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵpropertyInterpolat // SOURCE: "/interpolation_properties.ts" id="{{name}}"></div>'
.ɵɵpropertyInterpolat // SOURCE: "/interpolation_properties.ts" "id=\"{{name}}\"></div>'"

View File

@ -1,5 +1,5 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" <div>
i0.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" "<div>"
i0.ɵɵelementEnd() // SOURCE: "/interpolation_with_pipe.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/interpolation_with_pipe.ts" "</div>"
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }}
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" "{{200.3 | percent : 2 }}"

View File

@ -1,6 +1,6 @@
.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" <div>
.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" "<div>"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelem // SOURCE: "/interpolation_with_pipe.ts" </div>'
.ɵɵelem // SOURCE: "/interpolation_with_pipe.ts" "</div>'"
.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }}
.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" "{{200.3 | percent : 2 }}"

View File

@ -1,15 +1,15 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_for_simple.ts" <div *ngFor="let item
i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_for_simple.ts" "<div *ngFor="let item "
i0.ɵɵtext(1) // SOURCE: "/ng_for_simple.ts" {{ item }}
i0.ɵɵtext(1) // SOURCE: "/ng_for_simple.ts" "{{ item }}"
i0.ɵɵelementEnd() // SOURCE: "/ng_for_simple.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/ng_for_simple.ts" "</div>"
i0.ɵɵadvance(1) // SOURCE: "/ng_for_simple.ts" {{ item }}
i0.ɵɵadvance(1) // SOURCE: "/ng_for_simple.ts" "{{ item }}"
i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_simple.ts" {{ item }}
i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_simple.ts" "{{ item }}"
i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts" <div *ngFor="let item
i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts" "<div *ngFor="let item "
i0.ɵɵproperty("ngForOf", ctx.items) // SOURCE: "/ng_for_simple.ts" of items;
i0.ɵɵproperty("ngForOf", ctx.items) // SOURCE: "/ng_for_simple.ts" "of items; "
("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" index as i; trackBy: trackByFn">
("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" "index as i; trackBy: trackByFn\">"

View File

@ -1,15 +1,15 @@
.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_for_simple.ts" <div *ngFor="let item
.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_for_simple.ts" "<div *ngFor="let item "
.ɵɵtext(1);\n // SOURCE: "/ng_for_simple.ts" {{ item }}
.ɵɵtext(1);\n // SOURCE: "/ng_for_simple.ts" "{{ item }}"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelem // SOURCE: "/ng_for_simple.ts" </div>'
.ɵɵelem // SOURCE: "/ng_for_simple.ts" "</div>'"
.ɵɵadvance(1);\n // SOURCE: "/ng_for_simple.ts" {{ item }}
.ɵɵadvance(1);\n // SOURCE: "/ng_for_simple.ts" "{{ item }}"
.ɵɵtextInterpolate(item_r1);\n }\n}\n\n // SOURCE: "/ng_for_simple.ts" {{ item }}
.ɵɵtextInterpolate(item_r1);\n }\n}\n\n // SOURCE: "/ng_for_simple.ts" "{{ item }}"
.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts" <div *ngFor="let item
.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts" "<div *ngFor="let item "
// TODO: Work out if we can split these two calls
.ɵɵproperty("ngForOf", ctx.items)("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" of items; index as i; trackBy: trackByFn">
.ɵɵproperty("ngForOf", ctx.items)("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" "of items; index as i; trackBy: trackByFn\">"

View File

@ -1,4 +1,4 @@
i0.ɵɵtext(0) // SOURCE: "/ng_for_templated.ts" {{ item }}
i0.ɵɵtext(0) // SOURCE: "/ng_for_templated.ts" "{{ item }}"
// TODO - map the bindings better
i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_templated.ts" {{ item }}
i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_templated.ts" "{{ item }}"

View File

@ -1,5 +1,5 @@
.ɵɵtext(0);\n }\n\n if (rf & 2) {\n const item_r1 = ctx.$implicit;\n // SOURCE: "/ng_for_templated.ts" {{ item }}</ng-template>`
.ɵɵtext(0);\n }\n\n if (rf & 2) {\n const item_r1 = ctx.$implicit;\n // SOURCE: "/ng_for_templated.ts" "{{ item }}</ng-template>`"
// TODO - map the bindings better
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵtextInterpolate(item_r // SOURCE: "/ng_for_templated.ts" {{ item }}</ng-template>`
.ɵɵtextInterpolate(item_r // SOURCE: "/ng_for_templated.ts" "{{ item }}</ng-template>`"

View File

@ -1,11 +1,11 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_simple.ts" <div *
i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_simple.ts" "<div *"
i0.ɵɵtext(1) // SOURCE: "/ng_if_simple.ts" {{ name }}
i0.ɵɵtext(1) // SOURCE: "/ng_if_simple.ts" "{{ name }}"
i0.ɵɵelementEnd() // SOURCE: "/ng_if_simple.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/ng_if_simple.ts" "</div>"
i0.ɵɵtextInterpolate(ctx_r0.name) // SOURCE: "/ng_if_simple.ts" {{ name }}
i0.ɵɵtextInterpolate(ctx_r0.name) // SOURCE: "/ng_if_simple.ts" "{{ name }}"
i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts" <div *
i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts" "<div *"
i0.ɵɵproperty("ngIf", ctx.showMessage()) // SOURCE: "/ng_if_simple.ts" ngIf="showMessage()
i0.ɵɵproperty("ngIf", ctx.showMessage()) // SOURCE: "/ng_if_simple.ts" "ngIf=\"showMessage()"

View File

@ -1,12 +1,12 @@
.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_simple.ts" <div *
.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_simple.ts" "<div *"
.ɵɵtext(1);\n // SOURCE: "/ng_if_simple.ts" {{ name }}
.ɵɵtext(1);\n // SOURCE: "/ng_if_simple.ts" "{{ name }}"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelem // SOURCE: "/ng_if_simple.ts" </div>'
.ɵɵelem // SOURCE: "/ng_if_simple.ts" "</div>'"
.ɵɵtextInterpolate(ctx_r0.name);\n }\n}\n\n // SOURCE: "/ng_if_simple.ts" {{ name }}
.ɵɵtextInterpolate(ctx_r0.name);\n }\n}\n\n // SOURCE: "/ng_if_simple.ts" "{{ name }}"
.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts" <div *
.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts" "<div *"
.ɵɵproperty("ngIf", ctx.showMessage()) // SOURCE: "/ng_if_simple.ts" ngIf="showMessage()">
.ɵɵproperty("ngIf", ctx.showMessage()) // SOURCE: "/ng_if_simple.ts" "ngIf="showMessage()\">"

View File

@ -1,7 +1,7 @@
i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_templated.ts" <div>
i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_templated.ts" "<div>"
// TODO - map the bindings better
i0.ɵɵelementEnd() // SOURCE: "/ng_if_templated.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/ng_if_templated.ts" "</div>"
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
// TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'});

View File

@ -1,8 +1,8 @@
.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_templated.ts" <div>
.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_templated.ts" "<div>"
// TODO - map the bindings better
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelementEnd();\n // SOURCE: "/ng_if_templated.ts" </div>\n
.ɵɵelementEnd();\n // SOURCE: "/ng_if_templated.ts" "</div>\n "
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
// TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'});

View File

@ -1,11 +1,11 @@
i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" <button
i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" "<button "
ctx.items.push( // SOURCE: "/output_binding_complex.ts" items.push(
ctx.items.push( // SOURCE: "/output_binding_complex.ts" "items.push("
"item" // SOURCE: "/output_binding_complex.ts" 'item'
"item" // SOURCE: "/output_binding_complex.ts" "'item'"
+ ctx.items.length) // SOURCE: "/output_binding_complex.ts" + items.length)
+ ctx.items.length) // SOURCE: "/output_binding_complex.ts" " + items.length)"
i0.ɵɵtext(1, "Add Item") // SOURCE: "/output_binding_complex.ts" Add Item
i0.ɵɵtext(1, "Add Item") // SOURCE: "/output_binding_complex.ts" "Add Item"
i0.ɵɵelementEnd() // SOURCE: "/output_binding_complex.ts" </button>
i0.ɵɵelementEnd() // SOURCE: "/output_binding_complex.ts" "</button>"

View File

@ -1,13 +1,13 @@
.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" <button
.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" "<button "
.ɵɵlistener("click", function TestCmp_Template_button_click_0_listener() {\n // SOURCE: "/output_binding_complex.ts" (click)="
.ɵɵlistener("click", function TestCmp_Template_button_click_0_listener() {\n // SOURCE: "/output_binding_complex.ts" "(click)=""
ctx.items.push( // SOURCE: "/output_binding_complex.ts" items.push(
ctx.items.push( // SOURCE: "/output_binding_complex.ts" "items.push("
// TODO: fix the mappings here
"item" // SOURCE: "/output_binding_complex.ts" 'item' + items.length)">
"item" // SOURCE: "/output_binding_complex.ts" "'item' + items.length)\">"
.ɵɵtext(1, "Add Item") // SOURCE: "/output_binding_complex.ts" Add Item
.ɵɵtext(1, "Add Item") // SOURCE: "/output_binding_complex.ts" "Add Item"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelement // SOURCE: "/output_binding_complex.ts" </button>`
.ɵɵelement // SOURCE: "/output_binding_complex.ts" "</button>`"

View File

@ -1,8 +1,8 @@
i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" <button
i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" "<button "
ctx.doSomething() // SOURCE: "/output_binding_longhand.ts" doSomething()
ctx.doSomething() // SOURCE: "/output_binding_longhand.ts" "doSomething()"
i0.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_longhand.ts" Do it
i0.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_longhand.ts" "Do it"
i0.ɵɵelementEnd() // SOURCE: "/output_binding_longhand.ts" </button>
i0.ɵɵelementEnd() // SOURCE: "/output_binding_longhand.ts" "</button>"

View File

@ -1,9 +1,9 @@
.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" <button
.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" "<button "
ctx.doSomething() // SOURCE: "/output_binding_longhand.ts" doSomething()">
ctx.doSomething() // SOURCE: "/output_binding_longhand.ts" "doSomething()\">"
.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_longhand.ts" Do it
.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_longhand.ts" "Do it"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelement // SOURCE: "/output_binding_longhand.ts" </button>'
.ɵɵelement // SOURCE: "/output_binding_longhand.ts" "</button>'"

View File

@ -1,9 +1,9 @@
i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" <button
i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" "<button "
i0.ɵɵlistener("click", function TestCmp_Template_button_click_0_listener() { return // SOURCE: "/output_binding_simple.ts" (click)="
i0.ɵɵlistener("click", function TestCmp_Template_button_click_0_listener() { return // SOURCE: "/output_binding_simple.ts" "(click)=\""
ctx.doSomething() // SOURCE: "/output_binding_simple.ts" doSomething()
ctx.doSomething() // SOURCE: "/output_binding_simple.ts" "doSomething()"
i0.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_simple.ts" Do it
i0.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_simple.ts" "Do it"
i0.ɵɵelementEnd() // SOURCE: "/output_binding_simple.ts" </button>
i0.ɵɵelementEnd() // SOURCE: "/output_binding_simple.ts" "</button>"

View File

@ -1,10 +1,10 @@
.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" <button
.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" "<button "
.ɵɵlistener("click", function TestCmp_Template_button_click_0_listener() {\n // SOURCE: "/output_binding_simple.ts" (click)="
.ɵɵlistener("click", function TestCmp_Template_button_click_0_listener() {\n // SOURCE: "/output_binding_simple.ts" "(click)=\""
ctx.doSomething() // SOURCE: "/output_binding_simple.ts" doSomething()">
ctx.doSomething() // SOURCE: "/output_binding_simple.ts" "doSomething()\">"
.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_simple.ts" Do it
.ɵɵtext(1, "Do it") // SOURCE: "/output_binding_simple.ts" "Do it"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelement // SOURCE: "/output_binding_simple.ts" </button>'
.ɵɵelement // SOURCE: "/output_binding_simple.ts" "</button>'"

View File

@ -1,11 +1,11 @@
i0.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" <h3>
i0.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" "<h3>"
i0.ɵɵprojection(1) // SOURCE: "/projection.ts" <ng-content select="title"></ng-content>
i0.ɵɵprojection(1) // SOURCE: "/projection.ts" "<ng-content select=\"title\"></ng-content>"
i0.ɵɵelementEnd() // SOURCE: "/projection.ts" </h3>
i0.ɵɵelementEnd() // SOURCE: "/projection.ts" "</h3>"
i0.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" <div>
i0.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" "<div>"
i0.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" <ng-content></ng-content>
i0.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" "<ng-content></ng-content>"
i0.ɵɵelementEnd() // SOURCE: "/projection.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/projection.ts" "</div>"

View File

@ -1,11 +1,11 @@
.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" <h3>
.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" "<h3>"
.ɵɵprojection(1) // SOURCE: "/projection.ts" <ng-content select="title"></ng-content>
.ɵɵprojection(1) // SOURCE: "/projection.ts" "<ng-content select="title"></ng-content>"
.ɵɵelementEnd() // SOURCE: "/projection.ts" </h3>\n
.ɵɵelementEnd() // SOURCE: "/projection.ts" "</h3>\n "
.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" <div>
.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" "<div>"
.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" <ng-content></ng-content>
.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" "<ng-content></ng-content>"
.ɵɵelem // SOURCE: "/projection.ts" </div>`
.ɵɵelem // SOURCE: "/projection.ts" "</div>`"

View File

@ -1,5 +1,5 @@
i0.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" <h1>
i0.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" "<h1>"
i0.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1
i0.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" "Heading 1"
i0.ɵɵelementEnd() // SOURCE: "/simple_element.ts" </h1>
i0.ɵɵelementEnd() // SOURCE: "/simple_element.ts" "</h1>"

View File

@ -1,6 +1,6 @@
.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" <h1>
.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" "<h1>"
.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1
.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" "Heading 1"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵele // SOURCE: "/simple_element.ts" </h1>'
.ɵɵele // SOURCE: "/simple_element.ts" "</h1>'"

View File

@ -1,6 +1,6 @@
i0.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" <input
i0.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" "<input "
// TODO: improve mappings here
i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; }) // SOURCE: "/two_way_binding_longhand.ts" bindon-ngModel="name"
i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; }) // SOURCE: "/two_way_binding_longhand.ts" "bindon-ngModel=\"name\""
i0.ɵɵelementEnd() // SOURCE: "/two_way_binding_longhand.ts" <input
i0.ɵɵelementEnd() // SOURCE: "/two_way_binding_longhand.ts" "<input "

View File

@ -1,7 +1,7 @@
.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" <input
.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" "<input "
// TODO: improve mappings here
.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_longhand.ts" bindon-ngModel="name">'
.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_longhand.ts" "bindon-ngModel=\"name\">'"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelementEnd() // SOURCE: "/two_way_binding_longhand.ts" <input
.ɵɵelementEnd() // SOURCE: "/two_way_binding_longhand.ts" "<input "

View File

@ -1,7 +1,7 @@
i0.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_simple.ts" <input
i0.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_simple.ts" "<input "
// TODO: improve mappings here
i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; }) // SOURCE: "/two_way_binding_simple.ts" [(ngModel)]="name"
i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; }) // SOURCE: "/two_way_binding_simple.ts" "[(ngModel)]=\"name\""
i0.ɵɵelementEnd() // SOURCE: "/two_way_binding_simple.ts" <input
i0.ɵɵelementEnd() // SOURCE: "/two_way_binding_simple.ts" "<input "

View File

@ -1,7 +1,7 @@
.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_simple.ts" <input
.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_simple.ts" "<input "
// TODO: improve mappings here
.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_simple.ts" [(ngModel)]="name">'
.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_simple.ts" "[(ngModel)]=\"name\">'"
.ɵɵelementEnd() // SOURCE: "/two_way_binding_simple.ts" <input
.ɵɵelementEnd() // SOURCE: "/two_way_binding_simple.ts" "<input "

View File

@ -1,15 +1,15 @@
// NOTE: Creation mode
i0.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" <div>
i0.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" "<div>"
i0.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test
i0.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" "this is a test"
i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "</div>"
i0.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" <div>
i0.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" "<div>"
i0.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
i0.ɵɵtext(3) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}"
i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" </div>
i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "</div>"
// NOTE: Update mode
i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}"

View File

@ -1,16 +1,16 @@
// NOTE: Creation mode
.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" <div>
.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" "<div>"
.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test
.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" "this is a test"
.ɵɵelementEnd() // SOURCE: "/update_mode.ts" </div>
.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "</div>"
.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" <div>
.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" "<div>"
.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
.ɵɵtext(3) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}"
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵelem // SOURCE: "/update_mode.ts" </div>'
.ɵɵelem // SOURCE: "/update_mode.ts" "</div>"'
// NOTE: Update mode
.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }}
.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}"

View File

@ -1 +1 @@
i0.ɵɵelement(0, "hr") // SOURCE: "/void_element.ts" <hr>
i0.ɵɵelement(0, "hr") // SOURCE: "/void_element.ts" "<hr>"

View File

@ -1,2 +1,2 @@
// TODO: Work out how to fix the broken segment for the last item in a template
.ɵɵel // SOURCE: "/void_element.ts" <hr>'
.ɵɵel // SOURCE: "/void_element.ts" "<hr>'"

View File

@ -17,7 +17,7 @@ import {SourceFileLoader} from '../../../src/ngtsc/sourcemaps';
* comment that has the following syntax:
*
* ```
* <generated code> // SOURCE: "</path/to/original>" <original source>
* <generated code> // SOURCE: "</path/to/original>" "<original source>"
* ```
*
* The `path/to/original` path will be absolute within the mock file-system, where the root is the
@ -81,7 +81,7 @@ function extractMappings(
const mappings: SegmentMapping[] = [];
// capture and remove source mapping info
expected = expected.replace(
/^(.*?) \/\/ SOURCE: "([^"]*?)" (.*?)$/gm,
/^(.*?) \/\/ SOURCE: "([^"]*?)" "(.*?)"$/gm,
(_, rawGenerated: string, rawSourceUrl: string, rawSource: string) => {
// Since segments need to appear on a single line in the expected file, any newlines in the
// segment being checked must be escaped in the expected file and then unescaped here before
@ -97,8 +97,8 @@ function extractMappings(
}
function unescape(str: string): string {
const replacements: Record<any, string> = {'\\n': '\n', '\\r': '\r', '\\\\': '\\'};
return str.replace(/\\[rn\\]/g, match => replacements[match]);
const replacements: Record<any, string> = {'\\n': '\n', '\\r': '\r', '\\\\': '\\', '\\"': '\"'};
return str.replace(/\\[rn"\\]/g, match => replacements[match]);
}
/**