From 5a4ad800b3ae97bd1319a7c83a06f7c06304ec7b Mon Sep 17 00:00:00 2001 From: rouggy Date: Thu, 30 Jul 2026 23:24:58 +0200 Subject: [PATCH] test: pin which modes produce a recording MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- recordable_mode_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recordable_mode_test.go diff --git a/recordable_mode_test.go b/recordable_mode_test.go new file mode 100644 index 0000000..728285c --- /dev/null +++ b/recordable_mode_test.go @@ -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) + } + } +}