-
Notifications
You must be signed in to change notification settings - Fork 213
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
d48cb0c
commit 61d8eac
Showing
4 changed files
with
66 additions
and
8 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
45 changes: 45 additions & 0 deletions
45
src/test/kotlin/io/bazel/kotlin/KotlinJvmKspAssertionTest.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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package io.bazel.kotlin | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.JUnit4 | ||
|
||
@RunWith(JUnit4::class) | ||
class KotlinJvmKspAssertionTest: KotlinAssertionTestCase("src/test/data/jvm/ksp") { | ||
|
||
@Test | ||
fun testKSPCopiesAllFilesFromMetaINF() { | ||
jarTestCase("coffee_lib.jar", description = "Generated jar with ksp plugin contains meta-inf contents") { | ||
assertContainsExactEntries( | ||
"src/", | ||
"src/test/", | ||
"src/test/data/", | ||
"src/test/data/jvm/", | ||
"src/test/data/jvm/ksp/", | ||
"src/test/data/jvm/ksp/CoffeeAppService.class", | ||
"META-INF/", | ||
"META-INF/MANIFEST.MF" | ||
) | ||
} | ||
} | ||
|
||
@Test | ||
fun testKSPCopiesAllFilesFromMetaINFInMoshiLib() { | ||
jarTestCase("moshi_lib.jar", description = "Generated jar with ksp plugin contains meta-inf contents") { | ||
assertContainsExactEntries( | ||
"src/", | ||
"src/test/", | ||
"src/test/data/", | ||
"src/test/data/jvm/", | ||
"src/test/data/jvm/ksp/", | ||
"src/test/data/jvm/ksp/CoffeeAppModel.class", | ||
"src/test/data/jvm/ksp/CoffeeAppModelJsonAdapter.class", | ||
"META-INF/", | ||
"META-INF/MANIFEST.MF", | ||
"META-INF/proguard/", | ||
"META-INF/proguard/moshi-src.test.data.jvm.ksp.CoffeeAppModel.pro", | ||
"META-INF/src_test_data_jvm_ksp-moshi_lib.kotlin_module" | ||
) | ||
} | ||
} | ||
} |
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