diff options
Diffstat (limited to 'tests/auto/qrfcommserver/tst_qrfcommserver.cpp')
-rw-r--r-- | tests/auto/qrfcommserver/tst_qrfcommserver.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qrfcommserver/tst_qrfcommserver.cpp b/tests/auto/qrfcommserver/tst_qrfcommserver.cpp index d8324c33..cc64826c 100644 --- a/tests/auto/qrfcommserver/tst_qrfcommserver.cpp +++ b/tests/auto/qrfcommserver/tst_qrfcommserver.cpp @@ -78,6 +78,8 @@ private slots: void tst_receive_data(); void tst_receive(); + void tst_error(); + private: QBluetoothLocalDevice localDevice; }; @@ -311,6 +313,21 @@ void tst_QRfcommServer::tst_secureFlags() QCOMPARE(server.securityFlags(), QBluetooth::Encryption); } + +void tst_QRfcommServer::tst_error() +{ + QBluetoothServer server(QBluetoothServiceInfo::RfcommProtocol); + QSignalSpy errorSpy(&server, SIGNAL(error(QBluetoothServer::Error))); + QCOMPARE(errorSpy.count(), 0); + const QBluetoothServer::Error e = server.error(); + + QVERIFY(e != QBluetoothServer::UnknownError + && e != QBluetoothServer::PoweredOffError + && e != QBluetoothServer::InputOutputError + && e != QBluetoothServer::ServiceAlreadyRegisteredError + && e != QBluetoothServer::UnsupportedProtocolError); +} + QTEST_MAIN(tst_QRfcommServer) #include "tst_qrfcommserver.moc" |