mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-07 01:35:25 +08:00
qt 6.5.1 original
This commit is contained in:
20
tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt
Normal file
20
tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## qexecstringlist Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(qexecstringlist
|
||||
NO_INSTALL
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
tst_qexecstringlist.cpp
|
||||
LIBRARIES
|
||||
Qt::Test
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_apply_testlib_coverage_options(qexecstringlist)
|
@ -0,0 +1,58 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QTest>
|
||||
|
||||
class tst_QExecStringList: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void testA() const;
|
||||
void testB() const;
|
||||
void testB_data() const;
|
||||
void testC() const;
|
||||
};
|
||||
|
||||
void tst_QExecStringList::testA() const
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QExecStringList::testB() const
|
||||
{
|
||||
QFETCH(bool, dummy);
|
||||
Q_UNUSED(dummy);
|
||||
}
|
||||
|
||||
void tst_QExecStringList::testB_data() const
|
||||
{
|
||||
QTest::addColumn<bool>("dummy");
|
||||
|
||||
QTest::newRow("Data1") << false;
|
||||
QTest::newRow("Data2") << false;
|
||||
QTest::newRow("Data3") << false;
|
||||
}
|
||||
|
||||
void tst_QExecStringList::testC() const
|
||||
{
|
||||
}
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
tst_QExecStringList test;
|
||||
|
||||
QTest::qExec(&test, app.arguments());
|
||||
QTest::qExec(&test, QStringList("appName"));
|
||||
QTest::qExec(&test, QStringList("appName") << "testA");
|
||||
QTest::qExec(&test, QStringList("appName") << "testB");
|
||||
QTest::qExec(&test, QStringList("appName") << "testB:Data2");
|
||||
QTest::qExec(&test, QStringList("appName") << "testC");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include "tst_qexecstringlist.moc"
|
Reference in New Issue
Block a user