-
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.
Fix KSP processor wasm handling and improve tests
- Loading branch information
Showing
33 changed files
with
159 additions
and
194 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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: 1 addition & 1 deletion
2
...tests/src/main/kotlin/TestFiles.gradle.kt → ...tests/src/test/kotlin/TestFiles.gradle.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: 1 addition & 1 deletion
2
sweetspi-tests/src/main/kotlin/TestFiles.kt → sweetspi-tests/src/test/kotlin/TestFiles.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: 1 addition & 1 deletion
2
...rc/main/kotlin/TestFiles.multiplatform.kt → ...rc/test/kotlin/TestFiles.multiplatform.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: 1 addition & 1 deletion
2
...-tests/src/main/kotlin/TestFiles.sweet.kt → ...-tests/src/test/kotlin/TestFiles.sweet.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright (c) 2024-2025 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package dev.whyoleg.sweetspi.tests | ||
|
||
import org.junit.jupiter.api.extension.* | ||
import org.junit.jupiter.params.* | ||
import org.junit.jupiter.params.provider.* | ||
import java.util.stream.* | ||
import kotlin.streams.* | ||
|
||
data class TestVersions( | ||
val gradleVersion: String, | ||
val kotlinVersion: String, | ||
val kspVersion: String, | ||
) | ||
|
||
private const val MIN_GRADLE = "8.0.2" | ||
private const val LATEST_GRADLE = "8.12" | ||
private val KSP_VERSIONS = listOf( | ||
"2.0.0-1.0.24", | ||
"2.0.10-1.0.24", | ||
"2.0.21-1.0.28", | ||
"2.1.0-1.0.29", | ||
"2.1.10-RC-1.0.29", | ||
"2.1.20-Beta1-1.0.29", | ||
) | ||
|
||
abstract class TestVersionsProvider(private val versions: Sequence<TestVersions>) : ArgumentsProvider { | ||
constructor(block: suspend SequenceScope<TestVersions>.() -> Unit) : this(sequence(block)) | ||
|
||
override fun provideArguments(context: ExtensionContext?): Stream<out Arguments> = versions.map { Arguments.of(it) }.asStream() | ||
|
||
class LatestGradle : TestVersionsProvider({ | ||
KSP_VERSIONS.forEach { kspVersion -> | ||
yield( | ||
TestVersions( | ||
gradleVersion = LATEST_GRADLE, | ||
kotlinVersion = kspVersion.substringBeforeLast("-"), | ||
kspVersion = kspVersion | ||
) | ||
) | ||
} | ||
}) | ||
|
||
class All : TestVersionsProvider({ | ||
listOf(MIN_GRADLE, LATEST_GRADLE).forEach { gradleVersion -> | ||
KSP_VERSIONS.forEach { kspVersion -> | ||
yield( | ||
TestVersions( | ||
gradleVersion = gradleVersion, | ||
kotlinVersion = kspVersion.substringBeforeLast("-"), | ||
kspVersion = kspVersion | ||
) | ||
) | ||
} | ||
} | ||
}) | ||
} | ||
|
||
@ParameterizedTest | ||
@ArgumentsSource(TestVersionsProvider.LatestGradle::class) | ||
annotation class FastVersionedTest | ||
|
||
@ParameterizedTest | ||
@ArgumentsSource(TestVersionsProvider.All::class) | ||
annotation class FullVersionedTest |
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.