Run TypeAssignmentTest with KSP
Bug: 160322705
Test: TypeAssignmentTest
Change-Id: I35ddab08129b950a2fa2c674d642f2d39eebb3a3
diff --git a/room/compiler/src/test/kotlin/androidx/room/solver/TypeAssignmentTest.kt b/room/compiler/src/test/kotlin/androidx/room/solver/TypeAssignmentTest.kt
index adefbd9..22f6c5c 100644
--- a/room/compiler/src/test/kotlin/androidx/room/solver/TypeAssignmentTest.kt
+++ b/room/compiler/src/test/kotlin/androidx/room/solver/TypeAssignmentTest.kt
@@ -18,16 +18,16 @@
import androidx.room.compiler.processing.XTypeElement
import androidx.room.compiler.processing.XVariableElement
-import androidx.room.testing.TestInvocation
-import com.google.testing.compile.JavaFileObjects
+import androidx.room.compiler.processing.util.Source
+import androidx.room.compiler.processing.util.XTestInvocation
+import androidx.room.compiler.processing.util.runProcessorTest
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
-import simpleRun
class TypeAssignmentTest {
companion object {
- private val TEST_OBJECT = JavaFileObjects.forSourceString(
+ private val TEST_OBJECT = Source.java(
"foo.bar.MyObject",
"""
package foo.bar;
@@ -108,9 +108,9 @@
}
}
- private fun runTest(handler: TestInvocation.() -> Unit) {
- simpleRun(TEST_OBJECT) {
+ private fun runTest(handler: XTestInvocation.() -> Unit) {
+ runProcessorTest(sources = listOf(TEST_OBJECT)) {
it.apply { handler() }
- }.compilesWithoutError()
+ }
}
}
\ No newline at end of file