[Gradle] Add IdeaKotlinClasspathSerializationTest.test - empty ByteArray
^KT-55475 Verification Pending
This commit is contained in:
committed by
Space Team
parent
e19d5768e2
commit
ca32347c91
+8
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.gradle.idea.proto.AbstractSerializationTest
|
|||||||
import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinClasspath
|
import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinClasspath
|
||||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.tcs.TestIdeaKotlinInstances
|
import org.jetbrains.kotlin.gradle.idea.testFixtures.tcs.TestIdeaKotlinInstances
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
|
import kotlin.test.assertEquals
|
||||||
import kotlin.test.fail
|
import kotlin.test.fail
|
||||||
|
|
||||||
class IdeaKotlinClasspathSerializationTest : AbstractSerializationTest<IdeaKotlinClasspath>() {
|
class IdeaKotlinClasspathSerializationTest : AbstractSerializationTest<IdeaKotlinClasspath>() {
|
||||||
@@ -25,4 +26,11 @@ class IdeaKotlinClasspathSerializationTest : AbstractSerializationTest<IdeaKotli
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test - emptyClasspath`() = testSerialization(TestIdeaKotlinInstances.emptyClasspath)
|
fun `test - emptyClasspath`() = testSerialization(TestIdeaKotlinInstances.emptyClasspath)
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `test - empty ByteArray`() {
|
||||||
|
assertEquals(IdeaKotlinClasspath(), deserialize(byteArrayOf()))
|
||||||
|
if (serialize(IdeaKotlinClasspath()).isNotEmpty())
|
||||||
|
fail("Expected empty classpath to serialize into empty ByteArray")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user