test: pin which modes produce a recording

CW has moved in and out of this list twice — excluded for the missing sidetone,
restored because the other station is captured regardless. A test says which,
so the next reading of that comment does not undo the decision.
This commit is contained in:
2026-07-30 23:24:58 +02:00
parent e152ef0ee0
commit 5a4ad800b3
+22
View File
@@ -0,0 +1,22 @@
package main
import "testing"
// Which modes produce a recording worth keeping.
//
// CW has moved in and out of this list: it was excluded because SmartSDR does
// not route the operator's own sidetone through DAX, then restored because the
// other station is captured all the same. Pinned so it does not drift back.
func TestRecordableMode(t *testing.T) {
for _, m := range []string{"SSB", "USB", "LSB", "AM", "FM", "DV", "CW", "cw", " CW "} {
if !recordableMode(m) {
t.Errorf("recordableMode(%q) = false — it should be recorded", m)
}
}
// Digital audio is a modem tone nobody replays.
for _, m := range []string{"FT8", "FT4", "RTTY", "PSK31", "JT65", "", "DIGU"} {
if recordableMode(m) {
t.Errorf("recordableMode(%q) = true — digital modes carry no useful audio", m)
}
}
}