* #9782: fix warnings in tests

This commit is contained in:
Tristan Matthews
2012-04-12 15:23:34 -04:00
parent e28085157e
commit c111dfa068
3 changed files with 6 additions and 5 deletions

View File

@ -80,7 +80,8 @@ void AudioLayerTest::testAudioLayerSwitch()
CPPUNIT_ASSERT(dynamic_cast<AlsaLayer*>(Manager::instance().getAudioDriver()));
wasAlsa = dynamic_cast<AlsaLayer*>(Manager::instance().getAudioDriver()) != 0;
usleep(100000);
const struct timespec req = {0, 100000000};
nanosleep(&req, 0);
}
}
@ -90,7 +91,8 @@ void AudioLayerTest::testPulseConnect()
if (dynamic_cast<AlsaLayer*>(Manager::instance().getAudioDriver())) {
Manager::instance().switchAudioManager();
usleep(100000);
const struct timespec req = {0, 100000000};
nanosleep(&req, 0);
}
pulselayer_ = dynamic_cast<PulseLayer*>(Manager::instance().getAudioDriver());

View File

@ -67,7 +67,7 @@ void DelayDetectionTest::testCrossCorrelationDelay()
delaydetect_.crossCorrelate(ref, signal, result, 3, 10);
float expected[10] = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0};
// float expected[10] = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0};
}
void DelayDetectionTest::testFirFilter()

View File

@ -865,7 +865,6 @@ void MainBufferTest::testGetPutDataByID()
int test_input2 = 13;
int test_output;
int avail_for_put_testid;
int avail_for_put_defaultid;
// put by default_id get by test_id without preleminary put
@ -883,7 +882,7 @@ void MainBufferTest::testGetPutDataByID()
CPPUNIT_ASSERT(test_input1 == test_output);
// get by default_id without preliminary input
avail_for_put_testid = mainbuffer_.availForPut(test_id);
mainbuffer_.availForPut(test_id);
CPPUNIT_ASSERT(mainbuffer_.availForGetByID(test_id, default_id) == 0);
CPPUNIT_ASSERT(mainbuffer_.getDataByID(&test_output, sizeof(int), 100, test_id, default_id) == 0);