diff options
Diffstat (limited to 'sources/shiboken6/tests/test_generator/dummygentest.cpp')
-rw-r--r-- | sources/shiboken6/tests/test_generator/dummygentest.cpp | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/sources/shiboken6/tests/test_generator/dummygentest.cpp b/sources/shiboken6/tests/test_generator/dummygentest.cpp index c09cdfb82..d439e3d8c 100644 --- a/sources/shiboken6/tests/test_generator/dummygentest.cpp +++ b/sources/shiboken6/tests/test_generator/dummygentest.cpp @@ -1,37 +1,13 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of Qt for Python. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// 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 "dummygentest.h" #include "dummygenerator.h" #include "dummygentestconfig.h" -#include <QTemporaryFile> + +#include <QtCore/QProcess> +#include <QtCore/QTemporaryFile> #include <QtTest/QTest> -#include <QProcess> #define GENERATED_CONTENTS "// Generated code for class: Dummy" @@ -45,14 +21,14 @@ void DummyGenTest::initTestCase() headerFilePath = workDir + "/test_global.h"; typesystemFilePath = workDir + "/test_typesystem.xml"; projectFilePath = workDir + "/dummygentest-project.txt"; - generatedFilePath = QString("%1/dummy/dummy_generated.txt").arg(QDir::tempPath()); + generatedFilePath = QDir::tempPath() + u"/dummy/dummy_generated.txt"_qs; } void DummyGenTest::testCallGenRunnerWithFullPathToDummyGenModule() { QStringList args; args.append("--generator-set=" DUMMYGENERATOR_BINARY_DIR "/dummy_generator" MODULE_EXTENSION); - args.append(QString("--output-directory=%1").arg(QDir::tempPath())); + args.append(u"--output-directory="_qs + QDir::tempPath()); args.append(headerFilePath); args.append(typesystemFilePath); int result = QProcess::execute("generatorrunner", args); @@ -70,7 +46,7 @@ void DummyGenTest::testCallGenRunnerWithNameOfDummyGenModule() { QStringList args; args.append("--generator-set=dummy"); - args.append(QString("--output-directory=%1").arg(QDir::tempPath())); + args.append(u"--output-directory="_qs + QDir::tempPath()); args.append(headerFilePath); args.append(typesystemFilePath); int result = QProcess::execute("generatorrunner", args); @@ -87,7 +63,7 @@ void DummyGenTest::testCallGenRunnerWithNameOfDummyGenModule() void DummyGenTest::testCallDummyGeneratorExecutable() { QStringList args; - args.append(QString("--output-directory=%1").arg(QDir::tempPath())); + args.append(u"--output-directory="_qs + QDir::tempPath()); args.append(headerFilePath); args.append(typesystemFilePath); int result = QProcess::execute(DUMMYGENERATOR_BINARY, args); @@ -103,7 +79,7 @@ void DummyGenTest::testCallDummyGeneratorExecutable() void DummyGenTest::testProjectFileArgumentsReading() { - QStringList args(QString("--project-file=%1/dummygentest-project.txt").arg(workDir)); + QStringList args(u"--project-file="_qs + workDir + u"/dummygentest-project.txt"_qs); int result = QProcess::execute("generatorrunner", args); QCOMPARE(result, 0); |