MCPcopy Create free account
hub / github.com/KDE/labplot / testContainFalse

Method testContainFalse

tests/import_export/MQTT/MQTTTest.cpp:61–78  ·  view source on GitHub ↗

############################################################################## ################### check superior and inferior relations ################## ##############################################################################

Source from the content-addressed store, hash-verified

59// ################### check superior and inferior relations ##################
60// ##############################################################################
61void MQTTTest::testContainFalse() {
62 auto* client = new MQTTClient(QStringLiteral("test"));
63 const QString fileName = m_dataDir + QStringLiteral("contain_false.txt");
64 QFile file(fileName);
65
66 if (file.open(QIODevice::ReadOnly)) {
67 QTextStream in(&file);
68
69 while (!in.atEnd()) {
70 QString line = in.readLine();
71 auto topics = line.split(QLatin1Char(' '), Qt::SkipEmptyParts);
72 QCOMPARE(client->checkTopicContains(topics[0], topics[1]), false);
73 }
74
75 delete client;
76 file.close();
77 }
78}
79
80void MQTTTest::testContainTrue() {
81 auto* client = new MQTTClient(QStringLiteral("test"));

Callers

nothing calls this directly

Calls 5

atEndMethod · 0.80
splitMethod · 0.80
openMethod · 0.45
checkTopicContainsMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected