Add 'pass' test to testlib selftests
Change-Id: I858cd5e6ef7ad1064166efb7325c62065d46eb27 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
This commit is contained in:
parent
16f927a4f1
commit
a539e53eb0
14
tests/auto/testlib/selftests/expected_pass.junitxml
Normal file
14
tests/auto/testlib/selftests/expected_pass.junitxml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite errors="0" failures="0" tests="5" name="tst_Pass">
|
||||
<properties>
|
||||
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
|
||||
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
|
||||
<property value="" name="QtBuild"/>
|
||||
</properties>
|
||||
<testcase result="pass" name="initTestCase"/>
|
||||
<testcase result="pass" name="testNumber1"/>
|
||||
<testcase result="pass" name="testNumber2"/>
|
||||
<testcase result="pass" name="testNumber3"/>
|
||||
<testcase result="pass" name="cleanupTestCase"/>
|
||||
<system-err/>
|
||||
</testsuite>
|
26
tests/auto/testlib/selftests/expected_pass.lightxml
Normal file
26
tests/auto/testlib/selftests/expected_pass.lightxml
Normal file
@ -0,0 +1,26 @@
|
||||
<Environment>
|
||||
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
||||
<QtBuild/>
|
||||
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
||||
</Environment>
|
||||
<TestFunction name="initTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="testNumber1">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="testNumber2">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="testNumber3">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
11
tests/auto/testlib/selftests/expected_pass.tap
Normal file
11
tests/auto/testlib/selftests/expected_pass.tap
Normal file
@ -0,0 +1,11 @@
|
||||
TAP version 13
|
||||
# tst_Pass
|
||||
ok 1 - initTestCase()
|
||||
ok 2 - testNumber1()
|
||||
ok 3 - testNumber2()
|
||||
ok 4 - testNumber3()
|
||||
ok 5 - cleanupTestCase()
|
||||
1..5
|
||||
# tests 5
|
||||
# pass 5
|
||||
# fail 0
|
12
tests/auto/testlib/selftests/expected_pass.teamcity
Normal file
12
tests/auto/testlib/selftests/expected_pass.teamcity
Normal file
@ -0,0 +1,12 @@
|
||||
##teamcity[testSuiteStarted name='tst_Pass' flowId='tst_Pass']
|
||||
##teamcity[testStarted name='initTestCase()' flowId='tst_Pass']
|
||||
##teamcity[testFinished name='initTestCase()' flowId='tst_Pass']
|
||||
##teamcity[testStarted name='testNumber1()' flowId='tst_Pass']
|
||||
##teamcity[testFinished name='testNumber1()' flowId='tst_Pass']
|
||||
##teamcity[testStarted name='testNumber2()' flowId='tst_Pass']
|
||||
##teamcity[testFinished name='testNumber2()' flowId='tst_Pass']
|
||||
##teamcity[testStarted name='testNumber3()' flowId='tst_Pass']
|
||||
##teamcity[testFinished name='testNumber3()' flowId='tst_Pass']
|
||||
##teamcity[testStarted name='cleanupTestCase()' flowId='tst_Pass']
|
||||
##teamcity[testFinished name='cleanupTestCase()' flowId='tst_Pass']
|
||||
##teamcity[testSuiteFinished name='tst_Pass' flowId='tst_Pass']
|
9
tests/auto/testlib/selftests/expected_pass.txt
Normal file
9
tests/auto/testlib/selftests/expected_pass.txt
Normal file
@ -0,0 +1,9 @@
|
||||
********* Start testing of tst_Pass *********
|
||||
Config: Using QtTest library
|
||||
PASS : tst_Pass::initTestCase()
|
||||
PASS : tst_Pass::testNumber1()
|
||||
PASS : tst_Pass::testNumber2()
|
||||
PASS : tst_Pass::testNumber3()
|
||||
PASS : tst_Pass::cleanupTestCase()
|
||||
Totals: 5 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms
|
||||
********* Finished testing of tst_Pass *********
|
29
tests/auto/testlib/selftests/expected_pass.xml
Normal file
29
tests/auto/testlib/selftests/expected_pass.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TestCase name="tst_Pass">
|
||||
<Environment>
|
||||
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
||||
<QtBuild/>
|
||||
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
||||
</Environment>
|
||||
<TestFunction name="initTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="testNumber1">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="testNumber2">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="testNumber3">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
||||
</TestCase>
|
9
tests/auto/testlib/selftests/pass/pass.pro
Normal file
9
tests/auto/testlib/selftests/pass/pass.pro
Normal file
@ -0,0 +1,9 @@
|
||||
SOURCES += tst_pass.cpp
|
||||
QT = core testlib
|
||||
|
||||
macos:CONFIG -= app_bundle
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
TARGET = pass
|
||||
|
||||
include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
|
56
tests/auto/testlib/selftests/pass/tst_pass.cpp
Normal file
56
tests/auto/testlib/selftests/pass/tst_pass.cpp
Normal file
@ -0,0 +1,56 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the test suite of the Qt Toolkit.
|
||||
**
|
||||
** $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$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
class tst_Pass: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void testNumber1() const;
|
||||
void testNumber2() const;
|
||||
void testNumber3() const;
|
||||
};
|
||||
|
||||
void tst_Pass::testNumber1() const
|
||||
{
|
||||
}
|
||||
|
||||
void tst_Pass::testNumber2() const
|
||||
{
|
||||
}
|
||||
|
||||
void tst_Pass::testNumber3() const
|
||||
{
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_Pass)
|
||||
|
||||
#include "tst_pass.moc"
|
@ -31,6 +31,7 @@ SUBPROGRAMS = \
|
||||
longstring \
|
||||
maxwarnings \
|
||||
multiexec \
|
||||
pass \
|
||||
pairdiagnostics \
|
||||
printdatatags \
|
||||
printdatatagswithglobaltags \
|
||||
|
@ -422,9 +422,9 @@ void tst_Selftests::initTestCase()
|
||||
{
|
||||
QVERIFY2(tempDir.isValid(), qPrintable(tempDir.errorString()));
|
||||
//Detect the location of the sub programs
|
||||
QString subProgram = QLatin1String("float/float");
|
||||
QString subProgram = QLatin1String("pass/pass");
|
||||
#if defined(Q_OS_WIN)
|
||||
subProgram = QLatin1String("float/float.exe");
|
||||
subProgram = QLatin1String("pass/pass.exe");
|
||||
#endif
|
||||
QString testdataDir = QFINDTESTDATA(subProgram);
|
||||
if (testdataDir.lastIndexOf(subProgram) > 0)
|
||||
@ -487,6 +487,7 @@ void tst_Selftests::runSubTest_data()
|
||||
<< "longstring"
|
||||
<< "maxwarnings"
|
||||
<< "multiexec"
|
||||
<< "pass"
|
||||
<< "pairdiagnostics"
|
||||
<< "printdatatags"
|
||||
<< "printdatatagswithglobaltags"
|
||||
|
Loading…
Reference in New Issue
Block a user