aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-04-26 17:12:17 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-05-03 08:36:16 +0000
commit18289e7c1d2778460dccb1135fe283bd234954ad (patch)
tree6a00b98124cd70f3991ea878d519f30d8b418690 /tests
parent7a16e8d9b56b2740507021f84c522bd32a0ae1d7 (diff)
Remove the "Error" ending from QtCoap::Error enum value namesv5.13.0-rc3v5.13.0-rc2v5.13.0-rc1v5.13.0-beta4v5.13.05.13.0
QtCoap::Error is a scoped enum class, so its value names will get the "Error::" prefix anyway. No need to have it as a suffix for the value names. For the same reason replaced QtCoap::Error::NoError by QtCoap::Error::Ok. Change-Id: Iaf7b51cdab6ea330e940e5af73ba93a55eb48315 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qcoapclient/tst_qcoapclient.cpp4
-rw-r--r--tests/auto/qcoapreply/tst_qcoapreply.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qcoapclient/tst_qcoapclient.cpp b/tests/auto/qcoapclient/tst_qcoapclient.cpp
index 261a95a..3e5eac0 100644
--- a/tests/auto/qcoapclient/tst_qcoapclient.cpp
+++ b/tests/auto/qcoapclient/tst_qcoapclient.cpp
@@ -462,7 +462,7 @@ void tst_QCoapClient::socketError()
QTRY_COMPARE_WITH_TIMEOUT(spySocketError.count(), 1, 10000);
QTRY_COMPARE_WITH_TIMEOUT(spyClientError.count(), 1, 1000);
QCOMPARE(qvariant_cast<QtCoap::Error>(spyClientError.first().at(1)),
- QtCoap::Error::AddressInUseError);
+ QtCoap::Error::AddressInUse);
#else
QSKIP("Not an internal build, skipping this test");
#endif
@@ -516,7 +516,7 @@ void tst_QCoapClient::timeout()
qPrintable(errorMessage));
QCOMPARE(qvariant_cast<QtCoap::Error>(spyReplyError.first().at(1)),
- QtCoap::Error::TimeOutError);
+ QtCoap::Error::TimeOut);
QCOMPARE(spyReplyFinished.count(), 1);
QCOMPARE(spyReplyAborted.count(), 0);
QCOMPARE(spyClientError.count(), 1);
diff --git a/tests/auto/qcoapreply/tst_qcoapreply.cpp b/tests/auto/qcoapreply/tst_qcoapreply.cpp
index 200110f..d9a7562 100644
--- a/tests/auto/qcoapreply/tst_qcoapreply.cpp
+++ b/tests/auto/qcoapreply/tst_qcoapreply.cpp
@@ -66,19 +66,19 @@ void tst_QCoapReply::updateReply_data()
QTest::newRow("success")
<< QByteArray("Some data")
<< QtCoap::ResponseCode::Content
- << QtCoap::Error::NoError;
+ << QtCoap::Error::Ok;
QTest::newRow("content error")
<< QByteArray("Error")
<< QtCoap::ResponseCode::BadRequest
- << QtCoap::Error::NoError;
+ << QtCoap::Error::Ok;
QTest::newRow("finished error")
<< QByteArray("Error")
<< QtCoap::ResponseCode::Content
- << QtCoap::Error::BadRequestError;
+ << QtCoap::Error::BadRequest;
QTest::newRow("content & finished errors")
<< QByteArray("2Errors")
<< QtCoap::ResponseCode::BadGateway
- << QtCoap::Error::BadRequestError;
+ << QtCoap::Error::BadRequest;
}
void tst_QCoapReply::updateReply()
@@ -111,7 +111,7 @@ void tst_QCoapReply::updateReply()
QCOMPARE(spyReplyFinished.count(), 1);
QCOMPARE(spyReplyNotified.count(), 0);
QCOMPARE(spyReplyAborted.count(), 0);
- if (error != QtCoap::Error::NoError || QtCoap::isError(responseCode)) {
+ if (error != QtCoap::Error::Ok || QtCoap::isError(responseCode)) {
QVERIFY(spyReplyError.count() > 0);
QCOMPARE(reply.isSuccessful(), false);
} else {