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

23 lines
543B

  1. //go:build cufft
  2. package gpudemod
  3. import "testing"
  4. func TestValidateDecimateRejectsBadLength(t *testing.T) {
  5. iq := []complex64{1 + 0i, 2 + 0i, 3 + 0i, 4 + 0i}
  6. out := []complex64{1 + 0i}
  7. if ValidateDecimate(iq, 2, out, 1e-6) {
  8. t.Fatal("expected decimate validation to fail on bad length")
  9. }
  10. }
  11. func TestValidateFIRRejectsBadLength(t *testing.T) {
  12. iq := []complex64{1 + 0i, 2 + 0i}
  13. taps := []float32{1}
  14. out := []complex64{1 + 0i}
  15. if ValidateFIR(iq, taps, out, 1e-6) {
  16. t.Fatal("expected FIR validation to fail on bad length")
  17. }
  18. }