Wideband autonomous SDR analysis engine forked from sdr-visual-suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
581B

  1. package main
  2. import (
  3. "testing"
  4. "sdr-wideband-suite/internal/pipeline"
  5. )
  6. func TestPhaseStateCarriesPhaseResults(t *testing.T) {
  7. ps := &phaseState{
  8. surveillance: pipeline.SurveillanceResult{NoiseFloor: -90},
  9. refinement: pipeline.RefinementResult{Decisions: []pipeline.SignalDecision{{ShouldRecord: true}}},
  10. }
  11. if ps.surveillance.NoiseFloor != -90 {
  12. t.Fatalf("unexpected surveillance state: %+v", ps.surveillance)
  13. }
  14. if len(ps.refinement.Decisions) != 1 || !ps.refinement.Decisions[0].ShouldRecord {
  15. t.Fatalf("unexpected refinement state: %+v", ps.refinement)
  16. }
  17. }