Fix remember tests
Change-Id: I270d551ca7f3553cc3bf93e0a7a6edf1e16286f2
diff --git a/compose/compose-compiler-hosted/integration-tests/src/test/java/androidx/compose/plugins/kotlin/RememberIntrinsicTransformTests.kt b/compose/compose-compiler-hosted/integration-tests/src/test/java/androidx/compose/plugins/kotlin/RememberIntrinsicTransformTests.kt
index f827915..4b175f1 100644
--- a/compose/compose-compiler-hosted/integration-tests/src/test/java/androidx/compose/plugins/kotlin/RememberIntrinsicTransformTests.kt
+++ b/compose/compose-compiler-hosted/integration-tests/src/test/java/androidx/compose/plugins/kotlin/RememberIntrinsicTransformTests.kt
@@ -52,7 +52,7 @@
"""
@Composable
fun rememberFoo(a: Int, b: Int, %composer: Composer<*>?, %key: Int, %changed: Int): Foo {
- %composer.startReplaceableGroup(<> xor %key, "C:Test.kt")
+ %composer.startReplaceableGroup(<> xor %key, "C(rememberFoo):Test.kt")
val tmp0 = %composer.cache(%changed and 0b0110 === 0 && %composer.changed(a) || %changed and 0b0110 === 0b0100 or %changed and 0b00011000 === 0 && %composer.changed(b) || %changed and 0b00011000 === 0b00010000) {
val tmp0_return = Foo(a, b)
tmp0_return
@@ -81,7 +81,7 @@
"""
@Composable
fun Test(%composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C<A()>,<rememb...>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)<A()>,<rememb...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
val foo = %composer.cache(false) {
val tmp0_return = Foo()
@@ -123,7 +123,7 @@
"""
@Composable
fun Test(%composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
val a = someInt()
val b = someInt()
@@ -156,7 +156,7 @@
"""
@Composable
fun Test(%composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C<rememb...>,<CInt()...>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)<rememb...>,<CInt()...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
val foo = remember(CInt(%composer, <>, 0), {
val tmp0_return = Foo()
@@ -191,7 +191,7 @@
"""
@Composable
fun Test(%composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C<curren...>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)<curren...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
val bar = ambientBar.current
val foo = %composer.cache(%composer.changed(bar)) {
@@ -226,7 +226,7 @@
"""
@Composable
fun Test(%composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C<curren...>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)<curren...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
val foo = %composer.cache(%composer.changed(ambientBar.current)) {
val tmp0_return = Foo()
@@ -258,7 +258,7 @@
"""
@Composable
fun Test(%composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C<A()>,<rememb...>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)<A()>,<rememb...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
A(%composer, <>, 0)
val foo = remember({
@@ -293,7 +293,7 @@
"""
@Composable
fun Test(condition: Boolean, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C<A()>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)<A()>:Test.kt")
val %dirty = %changed
if (%changed and 0b0110 === 0) {
%dirty = %dirty or if (%composer.changed(condition)) 0b0100 else 0b0010
@@ -339,7 +339,7 @@
"""
@Composable
fun Test(condition: Boolean, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test):Test.kt")
val %dirty = %changed
if (%changed and 0b0110 === 0) {
%dirty = %dirty or if (%composer.changed(condition)) 0b0100 else 0b0010
@@ -385,7 +385,7 @@
"""
@Composable
fun Test(items: List<Int>, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C*<rememb...>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)*<rememb...>:Test.kt")
val tmp0_iterator = items.iterator()
while (tmp0_iterator.hasNext()) {
val item = tmp0_iterator.next()
@@ -423,7 +423,7 @@
"""
@Composable
fun Test(items: List<Int>, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C*<rememb...>,<A()>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)*<rememb...>,<A()>:Test.kt")
val tmp0_iterator = items.iterator()
while (tmp0_iterator.hasNext()) {
val item = tmp0_iterator.next()
@@ -456,7 +456,7 @@
"""
@Composable
fun Test(items: List<Int>, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test):Test.kt")
val foo = %composer.cache(false) {
val tmp0_return = Foo()
tmp0_return
@@ -483,7 +483,7 @@
"""
@Composable
fun Test(a: Int, b: Int, c: Bar, d: Boolean, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test):Test.kt")
val foo = %composer.cache(%changed and 0b0110 === 0 && %composer.changed(a) || %changed and 0b0110 === 0b0100 or %changed and 0b00011000 === 0 && %composer.changed(b) || %changed and 0b00011000 === 0b00010000 or %changed and 0b01100000 === 0 && %composer.changed(c) || %changed and 0b01100000 === 0b01000000 or %changed and 0b000110000000 === 0 && %composer.changed(d) || %changed and 0b000110000000 === 0b000100000000) {
val tmp0_return = Foo()
tmp0_return
@@ -510,7 +510,7 @@
"""
@Composable
fun Test(items: Array<Bar>, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C<rememb...>:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)<rememb...>:Test.kt")
val foo = remember(*items, {
val tmp0_return = Foo()
tmp0_return
@@ -538,7 +538,7 @@
"""
@Composable
fun Test(inlineInt: InlineInt, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test)P(0:InlineInt):Test.kt")
val %dirty = %changed
if (%changed and 0b0110 === 0) {
%dirty = %dirty or if (%composer.changed(inlineInt.value)) 0b0100 else 0b0010
@@ -579,7 +579,7 @@
"""
@Composable
fun Test(%composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
val a = someInt()
val b = someInt()
@@ -619,7 +619,7 @@
"""
@Composable
fun Test(a: Int, %composer: Composer<*>?, %key: Int, %changed: Int) {
- %composer.startRestartGroup(<> xor %key, "C:Test.kt")
+ %composer.startRestartGroup(<> xor %key, "C(Test):Test.kt")
val %dirty = %changed
if (%changed and 0b0110 === 0) {
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
@@ -656,7 +656,7 @@
"""
@Composable
fun Test(a: Int, %composer: Composer<*>?, %key: Int, %changed: Int): Foo {
- %composer.startReplaceableGroup(<> xor %key, "C:Test.kt")
+ %composer.startReplaceableGroup(<> xor %key, "C(Test):Test.kt")
val b = someInt()
val tmp0 = %composer.cache(%changed and 0b0110 === 0 && %composer.changed(a) || %changed and 0b0110 === 0b0100 or %composer.changed(b)) {
val tmp0_return = Foo(a, b)