Wideband autonomous SDR analysis engine forked from sdr-visual-suite
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
715B

  1. package pipeline
  2. import "testing"
  3. func TestWantsClass(t *testing.T) {
  4. if !WantsClass([]string{"WFM", "DMR"}, "wfm") {
  5. t.Fatalf("expected case-insensitive match")
  6. }
  7. if WantsClass([]string{"DMR"}, "WFM") {
  8. t.Fatalf("unexpected match")
  9. }
  10. }
  11. func TestCandidatePriorityBoost(t *testing.T) {
  12. p := Policy{SignalPriorities: []string{"voice", "digital", "cw"}}
  13. if boost := CandidatePriorityBoost(p, "digital-burst"); boost <= 0 {
  14. t.Fatalf("expected positive boost, got %v", boost)
  15. }
  16. }
  17. func TestCandidatePriorityBoostUsesIntent(t *testing.T) {
  18. p := Policy{Intent: "digital-surveillance"}
  19. if boost := CandidatePriorityBoost(p, "digital"); boost <= 0 {
  20. t.Fatalf("expected intent boost, got %v", boost)
  21. }
  22. }