Remove some test functions that are actually integration tests.
And they're already in the qcamerabackend test. Change-Id: If3edba9035380372a2e8d46efe1cf41e91ce5f09 Reviewed-by: Ling Hu <ling.hu@nokia.com> Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
f9ec11a25e
commit
d9dc920393
@@ -79,9 +79,6 @@ public slots:
|
|||||||
void cleanupTestCase();
|
void cleanupTestCase();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void testAvailableDevices();
|
|
||||||
void testDeviceDescription();
|
|
||||||
void testCtorWithDevice();
|
|
||||||
void testSimpleCamera();
|
void testSimpleCamera();
|
||||||
void testSimpleCameraWhiteBalance();
|
void testSimpleCameraWhiteBalance();
|
||||||
void testSimpleCameraExposure();
|
void testSimpleCameraExposure();
|
||||||
@@ -183,42 +180,6 @@ void tst_QCamera::cleanupTestCase()
|
|||||||
delete provider;
|
delete provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QCamera::testAvailableDevices()
|
|
||||||
{
|
|
||||||
int deviceCount = QMediaServiceProvider::defaultServiceProvider()->devices(QByteArray(Q_MEDIASERVICE_CAMERA)).count();
|
|
||||||
|
|
||||||
QVERIFY(QCamera::availableDevices().count() == deviceCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QCamera::testDeviceDescription()
|
|
||||||
{
|
|
||||||
int deviceCount = QMediaServiceProvider::defaultServiceProvider()->devices(QByteArray(Q_MEDIASERVICE_CAMERA)).count();
|
|
||||||
|
|
||||||
if (deviceCount == 0)
|
|
||||||
QVERIFY(QCamera::deviceDescription(QByteArray("random")).isNull());
|
|
||||||
else {
|
|
||||||
foreach (const QByteArray &device, QCamera::availableDevices())
|
|
||||||
QVERIFY(QCamera::deviceDescription(device).length() > 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QCamera::testCtorWithDevice()
|
|
||||||
{
|
|
||||||
int deviceCount = QMediaServiceProvider::defaultServiceProvider()->devices(QByteArray(Q_MEDIASERVICE_CAMERA)).count();
|
|
||||||
QCamera *camera = 0;
|
|
||||||
|
|
||||||
if (deviceCount == 0) {
|
|
||||||
camera = new QCamera("random");
|
|
||||||
QVERIFY(camera->error() == QCamera::ServiceMissingError);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
camera = new QCamera(QCamera::availableDevices().first());
|
|
||||||
QVERIFY(camera->error() == QCamera::NoError);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete camera;
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QCamera::testSimpleCamera()
|
void tst_QCamera::testSimpleCamera()
|
||||||
{
|
{
|
||||||
QCamera camera(0, provider);
|
QCamera camera(0, provider);
|
||||||
|
|||||||
Reference in New Issue
Block a user