29 void identifierBasics();
32 void machineUniqueId();
35 void dbusObjectPath();
46 void CTestIdentifier::identifierBasics()
51 QVERIFY2(o1 == o2,
"Two default identifiers shall be equal");
52 QVERIFY2(o1 != o3,
"Those identifiers shall be unequal");
56 q.setObjectName(
"foo");
58 QVERIFY2(oa.identifier().getName() == q.objectName(),
"Names shall be equal");
59 q.setObjectName(
"bar");
60 QVERIFY2(oa.identifier().getName() == q.objectName(),
"Names shall be equal");
63 void CTestIdentifier::machineUniqueId()
68 "Machine id shall never be empty! If this test failed on a supported platform, get a fallback solution!");
71 void CTestIdentifier::dbusObjectPath()
74 q.setObjectName(QString::fromUtf16(u
"!@#$%^&*()_+\u263a"));
75 CTestIdentifiable id(&q);
76 QString s(
id.identifier().toDBusObjectPath());
78 "Conversion from dbus object path and back compares equal");
81 CTestIdentifiable::CTestIdentifiable(QObject *nameObject) :
CIdentifiable(nameObject) {}
88 #include "testidentifier.moc"
Test identifiable object.
Testing object identifier.
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
Value object encapsulating information identifying a component of a modular distributed swift process...
QByteArray getMachineId() const
Get machine id.
static CIdentifier fromDBusObjectPath(const QString &path, const QString &root={})
Reconstruct an identifier from a DBus object path.
Free functions in swift::misc.
SWIFTTEST_APPLESS_MAIN(MiscTest::CTestIdentifier)
main