Rewrite the code comments for consistent tone and accuracy
Comments only: the tokens of every Go file are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ import (
|
||||
|
||||
var update = flag.Bool("update", false, "rewrite docs/opcodes.md")
|
||||
|
||||
// TestLookup checks that Lookup finds an opcode by its name, its aliases and
|
||||
// the name of its family, and doesn't find a name that isn't the format's.
|
||||
func TestLookup(t *testing.T) {
|
||||
for _, tc := range []struct {
|
||||
name, canonical string
|
||||
@@ -74,6 +76,8 @@ func TestRegistryComplete(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestGetAs checks the types that GetAs reads an opcode as, and that it reads
|
||||
// note names and finds aliases.
|
||||
func TestGetAs(t *testing.T) {
|
||||
ops := Opcodes{"lokey": "c4", "hikey": " 72 ", "loopmode": "one_shot", "volume": "-3.5", "offset": "12", "bad": "x"}
|
||||
if n, ok := GetAs[int](ops, "lokey"); !ok || n != 60 {
|
||||
@@ -99,6 +103,8 @@ func TestGetAs(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestValidateValues checks the problems that Validate reports for the values
|
||||
// of opcodes, and that it leaves alone what it can't check.
|
||||
func TestValidateValues(t *testing.T) {
|
||||
text := "<region> sample=a.wav lokey=c4 hikey=60 lovel=100 hivel=20 volume=loud pan=300 loop_mode=sideways\n" +
|
||||
"<region> zampler_gain=3 locc7=1 pitch_keycenter=sample key=$K <wrong>\n" +
|
||||
|
||||
Reference in New Issue
Block a user