summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2016-01-06 13:40:49 +0100
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2016-01-06 14:07:14 +0000
commit98394eb81a10f2cfddbaf6e640e223da02f5709f (patch)
treee200cc69f4329181b06fa842cb4bc36b25b12b57 /tests
parent6b44821435bcc46fd349a8ef484777316fcaabd4 (diff)
Rename function errorText() -> errorString()
Most if not all Qt functions use the '...String()' suffix. Change-Id: I8f98e16d27e42c5246ee17b088949f779ccfb224 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qmodbusreply/tst_qmodbusreply.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/qmodbusreply/tst_qmodbusreply.cpp b/tests/auto/qmodbusreply/tst_qmodbusreply.cpp
index 2259186..0967697 100644
--- a/tests/auto/qmodbusreply/tst_qmodbusreply.cpp
+++ b/tests/auto/qmodbusreply/tst_qmodbusreply.cpp
@@ -57,7 +57,7 @@ void tst_QModbusReply::tst_ctor()
QCOMPARE(r.isFinished(), false);
QCOMPARE(r.result().isValid(), false);
QCOMPARE(r.rawResult().isValid(), false);
- QCOMPARE(r.errorText(), QString());
+ QCOMPARE(r.errorString(), QString());
QCOMPARE(r.error(), QModbusReply::NoError);
QModbusReply r2(QModbusReply::Raw, 2, this);
@@ -66,7 +66,7 @@ void tst_QModbusReply::tst_ctor()
QCOMPARE(r2.isFinished(), false);
QCOMPARE(r2.result().isValid(), false);
QCOMPARE(r2.rawResult().isValid(), false);
- QCOMPARE(r2.errorText(), QString());
+ QCOMPARE(r2.errorString(), QString());
QCOMPARE(r2.error(), QModbusReply::NoError);
}
@@ -81,7 +81,7 @@ void tst_QModbusReply::tst_setFinished()
QCOMPARE(replyTest.isFinished(), false);
QCOMPARE(replyTest.result().isValid(), false);
QCOMPARE(replyTest.rawResult().isValid(), false);
- QCOMPARE(replyTest.errorText(), QString());
+ QCOMPARE(replyTest.errorString(), QString());
QCOMPARE(replyTest.error(), QModbusReply::NoError);
QVERIFY(finishedSpy.isEmpty());
@@ -94,7 +94,7 @@ void tst_QModbusReply::tst_setFinished()
QCOMPARE(replyTest.isFinished(), true);
QCOMPARE(replyTest.result().isValid(), false);
QCOMPARE(replyTest.rawResult().isValid(), false);
- QCOMPARE(replyTest.errorText(), QString());
+ QCOMPARE(replyTest.errorString(), QString());
QCOMPARE(replyTest.error(), QModbusReply::NoError);
replyTest.setFinished(false);
@@ -104,14 +104,14 @@ void tst_QModbusReply::tst_setFinished()
QCOMPARE(replyTest.isFinished(), false);
QCOMPARE(replyTest.result().isValid(), false);
QCOMPARE(replyTest.rawResult().isValid(), false);
- QCOMPARE(replyTest.errorText(), QString());
+ QCOMPARE(replyTest.errorString(), QString());
QCOMPARE(replyTest.error(), QModbusReply::NoError);
}
void tst_QModbusReply::tst_setError_data()
{
QTest::addColumn<QModbusReply::ReplyError>("error");
- QTest::addColumn<QString>("errorText");
+ QTest::addColumn<QString>("errorString");
QTest::newRow("ProtocolError") << QModbusReply::ProtocolError << QString("ProtocolError");
QTest::newRow("NoError") << QModbusReply::NoError << QString("NoError");
@@ -123,7 +123,7 @@ void tst_QModbusReply::tst_setError_data()
void tst_QModbusReply::tst_setError()
{
QFETCH(QModbusReply::ReplyError, error);
- QFETCH(QString, errorText);
+ QFETCH(QString, errorString);
QModbusReply replyTest(QModbusReply::Common, 1);
QCOMPARE(replyTest.serverAddress(), 1);
@@ -133,15 +133,15 @@ void tst_QModbusReply::tst_setError()
QVERIFY(finishedSpy.isEmpty());
QVERIFY(errorSpy.isEmpty());
- replyTest.setError(error, errorText);
+ replyTest.setError(error, errorString);
QCOMPARE(finishedSpy.count(), 1);
QCOMPARE(errorSpy.count(), 1);
QCOMPARE(replyTest.rawResult().isValid(), false);
QCOMPARE(replyTest.error(), error);
- QCOMPARE(replyTest.errorText(), errorText);
+ QCOMPARE(replyTest.errorString(), errorString);
QCOMPARE(errorSpy.at(0).at(0).value<QModbusReply::ReplyError>(), error);
- replyTest.setError(error, errorText);
+ replyTest.setError(error, errorString);
replyTest.setFinished(true);
QCOMPARE(finishedSpy.count(), 3); //setError() implies call to setFinished()
QCOMPARE(errorSpy.count(), 2);