-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b21b7ae
commit 94fdb45
Showing
104 changed files
with
473 additions
and
186 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
_itest/builder-itest/src/main/kotlin/MyCustomAnnotationSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
_itest/builder-itest/src/test/kotlin/HelloWorldExampleTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
_itest/builder-itest/src/test/kotlin/KotlinDataClassSpecTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
_itest/builder-itest/src/test/kotlin/MyCustomAnnotationSpecTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
package io.toolisticon.kotlin.generation.itest.spi | ||
|
||
import io.toolisticon.kotlin.generation.spi.KotlinCodeGenerationContext | ||
import io.toolisticon.kotlin.generation.spi.AbstractKotlinCodeGenerationSpiRegistry | ||
import kotlin.reflect.KClass | ||
import io.toolisticon.kotlin.generation.context.AbstractKotlinCodeGenerationContext | ||
import io.toolisticon.kotlin.generation.spi.KotlinCodeGenerationSpiRegistry | ||
|
||
class TestContext(override val registry: AbstractKotlinCodeGenerationSpiRegistry) : KotlinCodeGenerationContext { | ||
override val contextType: KClass<*> = TestContext::class | ||
class TestContext(registry: KotlinCodeGenerationSpiRegistry) : AbstractKotlinCodeGenerationContext<TestContext>(registry) { | ||
override val contextType = TestContext::class | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
kotlin-code-generation-test/src/main/kotlin/KotlinCompilationAssert.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
package io.toolisticon.kotlin.generation.test | ||
|
||
import com.squareup.kotlinpoet.ExperimentalKotlinPoetApi | ||
import com.tschuchort.compiletesting.KotlinCompilation | ||
import io.toolisticon.kotlin.generation.test.model.KotlinCompilationResult | ||
import org.assertj.core.api.AbstractAssert | ||
import org.assertj.core.api.Assertions | ||
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi | ||
|
||
|
||
@ExperimentalKotlinPoetApi | ||
@ExperimentalCompilerApi | ||
class KotlinCompilationAssert( | ||
actual: KotlinCompilationResult, | ||
) : AbstractAssert<KotlinCompilationAssert, KotlinCompilationResult>(actual, KotlinCompilationAssert::class.java) { | ||
|
||
fun errorMessages() = Assertions.assertThat(actual.errors) | ||
fun errorMessages() = Assertions.assertThat(actual.errors) | ||
|
||
fun hasExitCode(exitCode: KotlinCompilation.ExitCode) : KotlinCompilationAssert = apply { | ||
fun hasExitCode(exitCode: KotlinCompilation.ExitCode): KotlinCompilationAssert = apply { | ||
Assertions.assertThat(actual.exitCode).isEqualTo(exitCode) | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
kotlin-code-generation-test/src/main/kotlin/model/KotlinCompilationCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
kotlin-code-generation-test/src/main/kotlin/model/KotlinCompilationResult.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.