summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp')
-rw-r--r--tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp b/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp
index aa2448a8..be2cadbf 100644
--- a/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp
+++ b/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp
@@ -65,6 +65,8 @@ private slots:
void tst_construction_data();
void tst_construction();
+
+ void tst_copy();
};
tst_QBluetoothHostInfo::tst_QBluetoothHostInfo()
@@ -171,6 +173,22 @@ void tst_QBluetoothHostInfo::tst_construction()
QCOMPARE(setter.address().isNull(), !validBtAddress);
}
+void tst_QBluetoothHostInfo::tst_copy()
+{
+ QBluetoothHostInfo original;
+ original.setAddress(QBluetoothAddress("11:22:33:44:55:66"));
+ original.setName(QStringLiteral("FunkyName"));
+
+ QBluetoothHostInfo assignConstructor(original);
+ QCOMPARE(assignConstructor.name(), original.name());
+ QCOMPARE(assignConstructor.address(), original.address());
+
+ QBluetoothHostInfo assignOperator;
+ assignOperator = original;
+ QCOMPARE(assignOperator.name(), original.name());
+ QCOMPARE(assignOperator.address(), original.address());
+}
+
QTEST_MAIN(tst_QBluetoothHostInfo)
#include "tst_qbluetoothhostinfo.moc"