| 45 | const int kNumberOfFramesInNonPowerOfTwoTestData = 228; |
| 46 | |
| 47 | TEST(SpectrogramTest, TooLittleDataYieldsNoFrames) { |
| 48 | Spectrogram sgram; |
| 49 | sgram.Initialize(400, 200); |
| 50 | std::vector<double> input; |
| 51 | // Generate 44 samples of audio. |
| 52 | SineWave(44100, 1000.0, 0.001, &input); |
| 53 | EXPECT_EQ(44, input.size()); |
| 54 | std::vector<std::vector<complex<double>>> output; |
| 55 | sgram.ComputeComplexSpectrogram(input, &output); |
| 56 | EXPECT_EQ(0, output.size()); |
| 57 | } |
| 58 | |
| 59 | TEST(SpectrogramTest, StepSizeSmallerThanWindow) { |
| 60 | Spectrogram sgram; |
nothing calls this directly
no test coverage detected