Skip to content

Commit

Permalink
Fix SFX tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dwursteisen committed Mar 18, 2024
1 parent f04767e commit 25a5fff
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.github.minigdx.tiny.sound.Song2
import com.github.minigdx.tiny.sound.WaveGenerator
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertTrue

class SfxLibTest {

Expand Down Expand Up @@ -71,16 +70,16 @@ class SfxLibTest {
val lib = SfxLib(mockResources, false)
val table = lib.toTable().call(lib.emptyScore().call())
val r = table["tracks"][1]["patterns"][1].checktable()!!.keys()
assertTrue(r.isEmpty())
assertEquals(16, r.size)
}

@Test
fun toScore() {
val lib = SfxLib(mockResources, false)
val score = lib.toScore().call(lib.toTable().call(lib.emptyScore().call()))
val expectedScore = """tiny-sfx 120 127
|1 01 19 00 FF 19 00 00 00 00 00
|
|1 01 19 00 FF 19 00 00 00 00 00
|000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100
|1
|0 01 19 00 FF 19 00 00 00 00 00
|0 01 19 00 FF 19 00 00 00 00 00
Expand All @@ -93,8 +92,8 @@ class SfxLibTest {
@Test
fun createEmptyScore() {
val expectedScore = """tiny-sfx 120 127
|1 01 19 00 FF 19 00 00 00 00 00
|
|1 01 19 00 FF 19 00 00 00 00 00
|000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100 000100
|1
|0 01 19 00 FF 19 00 00 00 00 00
|0 01 19 00 FF 19 00 00 00 00 00
Expand Down

0 comments on commit 25a5fff

Please sign in to comment.