LNXSDK/lib/aura/Tests/auratests/channels/TestMixChannel.hx

42 lines
973 B
Haxe
Raw Normal View History

2025-01-22 16:18:30 +01:00
package auratests.channels;
import utest.Assert;
import aura.channels.MixChannel;
@:access(aura.channels.MixChannel)
class TestMixChannel extends utest.Test {
var mixChannel: MixChannel;
var mixChannelHandle: MixChannelHandle;
function setupClass() {}
function setup() {
mixChannel = new MixChannel();
mixChannelHandle = new MixChannelHandle(mixChannel);
}
function teardown() {}
function test_startUnpausedAndUnfinished() {
// Regression test for https://github.com/MoritzBrueckner/aura/issues/7
final inputHandle = new MixChannelHandle(new MixChannel());
Assert.isFalse(mixChannel.paused);
Assert.isFalse(mixChannel.finished);
}
function test_isNotPlayable_ifNoInputChannelExists() {
Assert.isFalse(mixChannel.isPlayable());
}
function test_isPlayable_ifInputChannelExists() {
final inputHandle = new MixChannelHandle(new MixChannel());
inputHandle.setMixChannel(mixChannelHandle);
Assert.isTrue(mixChannel.isPlayable());
}
}