This commit is contained in:
2026-06-06 11:59:32 +02:00
parent 176cc0e62b
commit f91f9ff3b8
13 changed files with 866 additions and 90 deletions
+13
View File
@@ -83,6 +83,19 @@ func TestNatLess(t *testing.T) {
}
}
// A multi-reference field (n-fer POTA) counts each park separately.
func TestComputeMultiRef(t *testing.T) {
def := Def{Code: "POTA", Type: TypeReference, Field: "pota_ref", Dynamic: true, Confirm: []string{"lotw", "qsl"}, Valid: true}
qsos := []qso.QSO{
{Callsign: "W2QMI", Band: "20m", POTARef: "US-6544,US-0680", LOTWRcvd: "Y"},
{Callsign: "K1ABC", Band: "40m", POTARef: "US-0680"}, // shared park
}
r := Compute([]Def{def}, qsos, nil, nil)[0]
if r.Worked != 2 { // distinct parks: US-6544, US-0680
t.Errorf("POTA worked = %d, want 2 (%v)", r.Worked, refCodes(r))
}
}
func refCodes(r Result) []string {
out := make([]string, 0, len(r.Refs))
for _, rf := range r.Refs {