[Commonizer] Allow empty SharedCommonizerTarget
This commit is contained in:
+5
-5
@@ -85,6 +85,11 @@ class CommonizerTargetIdentityStringTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `empty shared target`() {
|
||||
assertEquals(SharedCommonizerTarget(emptySet<CommonizerTarget>()), parseCommonizerTarget("()"))
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
fun `fail parsing CommonizerTarget 1`() {
|
||||
parseCommonizerTarget("xxx,")
|
||||
@@ -95,11 +100,6 @@ class CommonizerTargetIdentityStringTest {
|
||||
parseCommonizerTarget("")
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
fun `fail parsing CommonizerTarget 3`() {
|
||||
parseCommonizerTarget("()")
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
fun `fail parsing CommonizerTarget 4`() {
|
||||
parseCommonizerTarget("(xxx")
|
||||
|
||||
+4
-2
@@ -72,9 +72,11 @@ class CommonizerTargetPrettyNameTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
@Test
|
||||
fun sharedTargetNoInnerTargets() {
|
||||
SharedCommonizerTarget(emptySet<CommonizerTarget>())
|
||||
assertEquals(
|
||||
"[]", SharedCommonizerTarget(emptySet<CommonizerTarget>()).prettyName
|
||||
)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
|
||||
Reference in New Issue
Block a user