Go-based FM stereo transmitter with RDS, Windows-first and cross-platform
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

27 řádky
689B

  1. package app
  2. import (
  3. "os"
  4. "path/filepath"
  5. "strings"
  6. "testing"
  7. "time"
  8. cfgpkg "github.com/jan/fm-rds-tx/internal/config"
  9. )
  10. func TestRunSimulatedTransmit(t *testing.T) {
  11. cfg := cfgpkg.Default()
  12. out := filepath.Join(t.TempDir(), "simulated.iqf32")
  13. summary, err := RunSimulatedTransmit(cfg, out, 20*time.Millisecond)
  14. if err != nil {
  15. t.Fatalf("RunSimulatedTransmit failed: %v", err)
  16. }
  17. if !strings.Contains(summary, "simulated transmit") {
  18. t.Fatalf("unexpected summary: %s", summary)
  19. }
  20. if info, err := os.Stat(out); err != nil || info.Size() == 0 {
  21. t.Fatalf("expected non-empty output file, err=%v", err)
  22. }
  23. }