tests: upgrade DDS smoke-tests to Qt Test-based checks (QString, QVariant, containers)
This commit is contained in:
1 parent
80a09df7b9
commit
3988248897
4 files changed
+62
-15
No files matched your search
@@ -1,5 +1,22 @@
|
||||
#include <iostream>
|
||||
int main() {
|
||||
std::cout << "[smoke] ddsFunctionTopicTests_smoke running" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#include <QObject>
|
||||
#include <QtTest>
|
||||
|
||||
class FunctionTopicSmokeTest : public QObject {
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void test_containers() {
|
||||
QStringList list;
|
||||
list << "a" << "b" << "c";
|
||||
QCOMPARE(list.size(), 3);
|
||||
QVERIFY(list.contains("b"));
|
||||
}
|
||||
void test_qmap_basic() {
|
||||
QMap<QString,int> m;
|
||||
m["one"] = 1;
|
||||
m["two"] = 2;
|
||||
QCOMPARE(m.value("two"), 2);
|
||||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(FunctionTopicSmokeTest)
|
||||
#include "ddsFunctionTopicTests_smoke.moc"
|
||||
Reference in new issue
Block a user