diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2014-04-22 18:05:25 +0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-03 21:12:22 +0200 |
commit | c0fc9aecd67323630011eaa9a1c213eed5bc5387 (patch) | |
tree | 3fb111d25548699e49112d02269f073827224b8b /tests/auto | |
parent | d3b44f36c91bd3066be0c8f39efd53aa122c3c86 (diff) | |
download | qtserialport-c0fc9aecd67323630011eaa9a1c213eed5bc5387.tar.gz |
Fix the default constructor test case
Commit 7c737e0edcb93585856c65890ef34e5c5a28ee6b introduced
this regression by changing the default baud rate from 0 to 9600.
Change-Id: If20315eb53c3416646541dda82add0f4fc12d4a3
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qserialport/tst_qserialport.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qserialport/tst_qserialport.cpp b/tests/auto/qserialport/tst_qserialport.cpp index 8c348bb..1fcd794 100644 --- a/tests/auto/qserialport/tst_qserialport.cpp +++ b/tests/auto/qserialport/tst_qserialport.cpp @@ -98,9 +98,10 @@ void tst_QSerialPort::defaultConstruct() QVERIFY(!serialPort.errorString().isEmpty()); // properties - QCOMPARE(serialPort.baudRate(), qint32(0)); - QCOMPARE(serialPort.baudRate(QSerialPort::Input), qint32(0)); - QCOMPARE(serialPort.baudRate(QSerialPort::Output), qint32(0)); + const qint32 defaultBaudRate = static_cast<qint32>(QSerialPort::Baud9600); + QCOMPARE(serialPort.baudRate(), defaultBaudRate); + QCOMPARE(serialPort.baudRate(QSerialPort::Input), defaultBaudRate); + QCOMPARE(serialPort.baudRate(QSerialPort::Output), defaultBaudRate); QCOMPARE(serialPort.dataBits(), QSerialPort::Data8); QCOMPARE(serialPort.parity(), QSerialPort::NoParity); QCOMPARE(serialPort.stopBits(), QSerialPort::OneStop); |