test: improve coverage across package

This commit is contained in:
2026-05-01 14:09:10 +05:30
parent e1c68ec7d0
commit e3f1f5046a
18 changed files with 2652 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
package modifier
import (
"errors"
"testing"
)
func TestErrInvalidPacket_Error(t *testing.T) {
e := &ErrInvalidPacket{Err: errors.New("bad checksum")}
want := "invalid packet: bad checksum"
if got := e.Error(); got != want {
t.Errorf("Error() = %q, want %q", got, want)
}
}
func TestErrInvalidArgs_Error(t *testing.T) {
e := &ErrInvalidArgs{Err: errors.New("missing 'a' arg")}
want := "invalid args: missing 'a' arg"
if got := e.Error(); got != want {
t.Errorf("Error() = %q, want %q", got, want)
}
}