20 lines
914 B
Luau
20 lines
914 B
Luau
-- music/far tests: generated Farandole Composer modules (tools/fixtures/far.py) parsed, rendered through
|
|
-- codecs/audio/Tracker and compared with openmpt123's render (loudness envelope, band spectrum, stereo balance, song
|
|
-- length), the contract, and the fuzz no-throw pass.
|
|
local T = require("@tests/T")
|
|
local S = require("@tests/music/_similar")
|
|
local Far = require("@rosetta/music/far")
|
|
local Cases = require("@tests/gen/far_cases")
|
|
|
|
local t = T.suite("far")
|
|
|
|
t:eq(Far.name, "far", "name")
|
|
t:eq(Far.category, "music", "category")
|
|
t:check(Far.caps.decode and not Far.caps.encode, "caps")
|
|
|
|
local mods = S.against(t, Far, Cases, { gainDb = 0.5, envErr = 1.0, spectral = 0.95, balance = 0.04, duration = 0.01 }, "s3m")
|
|
t:check(mods[1] and mods[1].patterns[2].rows == 48 and mods[1].channelMute[10], "pattern length, muted channel")
|
|
|
|
t:fuzz("decode", S.fuzzer(Far), S.samples(Cases), { mutations = 30 })
|
|
t:done()
|