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,19 @@
|
||||
#include <iostream>
|
||||
int main() {
|
||||
std::cout << "[smoke] ddsGenericDataTests_smoke running" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#include <QObject>
|
||||
#include <QtTest>
|
||||
|
||||
class GenericSmokeTest : public QObject {
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void test_string_ops() {
|
||||
QString s = QString::fromUtf8("mIxEd");
|
||||
QCOMPARE(s.toLower(), QString("mixed"));
|
||||
}
|
||||
void test_basic_qvariant() {
|
||||
QVariant v = QString("value");
|
||||
QVERIFY(v.canConvert<QString>());
|
||||
QCOMPARE(v.toString(), QString("value"));
|
||||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(GenericSmokeTest)
|
||||
#include "ddsGenericDataTests_smoke.moc"
|
||||
Reference in new issue
Block a user