Skip to content

Commit

Permalink
fix test tag applying - cant find modifier object
Browse files Browse the repository at this point in the history
  • Loading branch information
0xera committed Jul 13, 2024
1 parent 3b583df commit 24446fc
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import org.jetbrains.kotlin.ir.expressions.IrGetObjectValue
import org.jetbrains.kotlin.ir.expressions.IrGetValue
import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrGetObjectValueImpl
import org.jetbrains.kotlin.ir.interpreter.toIrConst
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.types.classFqName
Expand Down Expand Up @@ -363,9 +362,13 @@ internal class TestTagApplier(
irCall: IrCall,
lastFile: IrFile,
lastFunction: IrFunction,
) = "${lastFile.name}-" +
"${lastFunction.name}(${lastFunction.startOffset})-" +
"${irCall.symbol.owner.name}(${irCall.startOffset})"
) = buildString {
append(lastFile.name)
append("-")
append("${lastFunction.name}(${lastFunction.startOffset})")
append("-")
append("${irCall.symbol.owner.name}(${irCall.startOffset})")
}

private fun retrieveArgumentExpression(
param: IrValueParameter,
Expand All @@ -387,7 +390,8 @@ internal class TestTagApplier(
val Composable = FqName( "androidx.compose.runtime.Composable")
val modifierObjectClassId = ClassId(
FqName("androidx.compose.ui"),
Name.identifier("Modifier.Companion")
FqName("Modifier.Companion"),
isLocal = false
)
val thenFuncCallableId = CallableId(
ClassId(
Expand Down

0 comments on commit 24446fc

Please sign in to comment.