protocol/aprs: refactored
Some checks failed
Run tests / test (1.25) (push) Failing after 1m37s
Run tests / test (stable) (push) Failing after 1m37s

This commit is contained in:
2026-03-02 22:28:17 +01:00
parent 452f521866
commit 63040a44b3
24 changed files with 3506 additions and 1533 deletions

View File

@@ -0,0 +1,29 @@
package aprs
import (
"reflect"
"testing"
)
func testCompareData(t *testing.T, want, test Data) {
t.Helper()
if want == nil && test != nil {
t.Errorf("expected no data, got %T", test)
return
}
if want != nil && test == nil {
t.Errorf("expected data %T, got nil", want)
return
}
if reflect.TypeOf(want) != reflect.TypeOf(test) {
t.Errorf("expected data %T, got %T", want, test)
return
}
switch want := want.(type) {
case *Position:
testComparePosition(t, want, test.(*Position))
}
}