Wideband autonomous SDR analysis engine forked from sdr-visual-suite
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

29 wiersze
779B

  1. package pipeline
  2. import (
  3. "testing"
  4. "sdr-wideband-suite/internal/detector"
  5. )
  6. func TestRefinementResultCarriesDecisions(t *testing.T) {
  7. res := RefinementResult{
  8. Signals: []detector.Signal{{ID: 1}},
  9. Decisions: []SignalDecision{{ShouldRecord: true}},
  10. Candidates: []Candidate{{ID: 1}},
  11. }
  12. if len(res.Signals) != 1 || len(res.Decisions) != 1 || len(res.Candidates) != 1 {
  13. t.Fatalf("unexpected refinement result: %+v", res)
  14. }
  15. }
  16. func TestSurveillanceResultCarriesScheduledCandidates(t *testing.T) {
  17. res := SurveillanceResult{
  18. Candidates: []Candidate{{ID: 1}},
  19. Scheduled: []ScheduledCandidate{{Candidate: Candidate{ID: 1}, Priority: 10}},
  20. }
  21. if len(res.Candidates) != 1 || len(res.Scheduled) != 1 {
  22. t.Fatalf("unexpected surveillance result: %+v", res)
  23. }
  24. }