############################################################################## ############################ check common topics ########################### ##############################################################################
| 100 | // ############################ check common topics ########################### |
| 101 | // ############################################################################## |
| 102 | void MQTTTest::testCommonTrue() { |
| 103 | auto* client = new MQTTClient(QStringLiteral("test")); |
| 104 | const QString fileName = m_dataDir + QStringLiteral("common_true.txt"); |
| 105 | QFile file(fileName); |
| 106 | |
| 107 | if (file.open(QIODevice::ReadOnly)) { |
| 108 | QTextStream in(&file); |
| 109 | |
| 110 | while (!in.atEnd()) { |
| 111 | QString line = in.readLine(); |
| 112 | auto topics = line.split(QLatin1Char(' '), Qt::SkipEmptyParts); |
| 113 | QCOMPARE(client->checkCommonLevel(topics[0], topics[1]), topics[2]); |
| 114 | } |
| 115 | |
| 116 | delete client; |
| 117 | file.close(); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | void MQTTTest::testCommonFalse() { |
| 122 | auto* client = new MQTTClient(QStringLiteral("test")); |
nothing calls this directly
no test coverage detected