Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unit tests to build by removing references to @KotlinPoetKspPreview #30

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -17,10 +17,8 @@

package deezer.kustomexport.compiler

import com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview
import org.junit.Test

@KotlinPoetKspPreview
class ExportClassTest {

@Test
Expand Down
Expand Up @@ -17,10 +17,8 @@

package deezer.kustomexport.compiler

import com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview
import org.junit.Test

@KotlinPoetKspPreview
class ExportEnumTest {

@Test
Expand Down
Expand Up @@ -17,10 +17,8 @@

package deezer.kustomexport.compiler

import com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview
import org.junit.Test

@KotlinPoetKspPreview
class ExportInterfaceTest {

@Test
Expand Down
Expand Up @@ -16,10 +16,8 @@
*/
package deezer.kustomexport.compiler

import com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview
import org.junit.Test

@KotlinPoetKspPreview
class ExportSealedClassTest {
@Test
fun basicSealedClass() {
Expand Down
Expand Up @@ -17,11 +17,9 @@

package deezer.kustomexport.compiler

import com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview
import org.junit.Ignore
import org.junit.Test

@KotlinPoetKspPreview
class GenericsInterfaceTest {

@Test
Expand Down
Expand Up @@ -17,7 +17,6 @@

package deezer.kustomexport.compiler

import com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview
import com.tschuchort.compiletesting.KotlinCompilation
import com.tschuchort.compiletesting.SourceFile
import com.tschuchort.compiletesting.kspSourcesDir
Expand All @@ -32,12 +31,10 @@ import kotlin.test.fail
data class InputFile(val path: String, @Language("kotlin") val content: String)
data class ExpectedOutputFile(val path: String, @Language("kotlin") val content: String)

@KotlinPoetKspPreview
fun assertCompilationOutput(@Language("kotlin") fileContent: String, vararg files: ExpectedOutputFile) {
assertCompilationOutput(listOf(InputFile("Main.kt", fileContent)), files.asList())
}

@KotlinPoetKspPreview
fun assertCompilationOutput(inputFiles: List<InputFile>, expectedOutputFiles: List<ExpectedOutputFile>) {
// Requires to add the annotation here
val kustomExport = SourceFile.kotlin(
Expand Down Expand Up @@ -68,7 +65,6 @@ fun assertCompilationOutput(inputFiles: List<InputFile>, expectedOutputFiles: Li
}
}

@KotlinPoetKspPreview
private fun compile(
sourceFiles: List<SourceFile>,
expectedExitCode: KotlinCompilation.ExitCode = KotlinCompilation.ExitCode.OK
Expand All @@ -79,7 +75,6 @@ private fun compile(
return compilation
}

@KotlinPoetKspPreview
private fun prepareCompilation(sourceFiles: List<SourceFile>): KotlinCompilation {
return KotlinCompilation()
.apply {
Expand Down
Expand Up @@ -17,10 +17,8 @@

package deezer.kustomexport.compiler

import com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview
import org.junit.Test

@KotlinPoetKspPreview
class TypeMappingTest {

@Test
Expand Down