summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2020-07-09 17:02:06 +0200
committerUwe Klotz <uklotz@mixxx.org>2020-07-09 17:03:35 +0200
commit3b30fb4555557a8affc36f6ef8dc683c0ff34b7f (patch)
tree6e2ad13b944a04efa788a9693fb28f0ce41360b6
parentd967b0ee7b416be34a6c5774385b9157a00a2156 (diff)
Delete AnalyzerWaveformTest.wrongTotalSamples
This test internally triggers a debug assertion when processSamples() is called with invalid data. This must and will never happen as long as AnalyzerThread feeds its analyzers with valid data.
-rw-r--r--src/test/analyserwaveformtest.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/test/analyserwaveformtest.cpp b/src/test/analyserwaveformtest.cpp
index 47f2429fbd..bab8c44892 100644
--- a/src/test/analyserwaveformtest.cpp
+++ b/src/test/analyserwaveformtest.cpp
@@ -84,29 +84,4 @@ TEST_F(AnalyzerWaveformTest, canary) {
}
}
-//Test to make sure that if an incorrect totalSamples is passed to
-//initialize(..) and process(..) is told to process more samples than that,
-//that we don't step out of bounds.
-TEST_F(AnalyzerWaveformTest, wrongTotalSamples) {
- aw.initialize(tio, tio->getSampleRate(), BIGBUF_SIZE / 2);
- // Deliver double the expected samples
- int wrongTotalSamples = BIGBUF_SIZE;
- int blockSize = 2 * 32768;
- for (int i = CANARY_SIZE; i < CANARY_SIZE + wrongTotalSamples; i += blockSize) {
- aw.processSamples(&canaryBigBuf[i], blockSize);
- }
- aw.storeResults(tio);
- aw.cleanup();
- //Ensure the source buffer is intact
- for (int i = CANARY_SIZE; i < BIGBUF_SIZE; i++) {
- EXPECT_FLOAT_EQ(canaryBigBuf[i], MAGIC_FLOAT);
- }
- //Make sure our canaries are still OK
- for (int i = 0; i < CANARY_SIZE; i++) {
- EXPECT_FLOAT_EQ(canaryBigBuf[i], CANARY_FLOAT);
- }
- for (int i = CANARY_SIZE + BIGBUF_SIZE; i < 2 * CANARY_SIZE + BIGBUF_SIZE; i++) {
- EXPECT_FLOAT_EQ(canaryBigBuf[i], CANARY_FLOAT);
- }
-}
} // namespace