package kotlinx.coroutines.channels import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import kotlin.test.* class BroadcastChannelFactoryTest : TestBase() { @Test fun testRendezvousChannelNotSupported() { assertFailsWith { BroadcastChannel(0) } } @Test fun testUnlimitedChannelNotSupported() { assertFailsWith { BroadcastChannel(Channel.UNLIMITED) } } @Test fun testConflatedBroadcastChannel() { assertTrue { BroadcastChannel(Channel.CONFLATED) is ConflatedBroadcastChannel } } @Test fun testBufferedBroadcastChannel() { assertTrue { BroadcastChannel(1) is BroadcastChannelImpl } assertTrue { BroadcastChannel(10) is BroadcastChannelImpl } } @Test fun testInvalidCapacityNotSupported() { assertFailsWith { BroadcastChannel(-3) } } }