Tests: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: If456567691538b1a1f452111814c5f9eba401c43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
3edcd9420e
commit
5af4cb5a5a
@ -840,10 +840,6 @@ void tst_QRandomGenerator::stdUniformIntDistribution()
|
||||
|
||||
void tst_QRandomGenerator::stdGenerateCanonical()
|
||||
{
|
||||
#if defined(Q_CC_MSVC) && Q_CC_MSVC < 1900
|
||||
// see https://connect.microsoft.com/VisualStudio/feedback/details/811611
|
||||
QSKIP("MSVC 2013's std::generate_canonical is broken");
|
||||
#else
|
||||
QFETCH(uint, control);
|
||||
RandomGenerator rng(control);
|
||||
|
||||
@ -858,7 +854,6 @@ void tst_QRandomGenerator::stdGenerateCanonical()
|
||||
for (int i = 0; i < 4; ++i)
|
||||
QVERIFY_3TIMES(std::generate_canonical<qreal COMMA 32>(rng) !=
|
||||
std::generate_canonical<qreal COMMA 32>(rng));
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QRandomGenerator::stdUniformRealDistribution_data()
|
||||
|
@ -39,12 +39,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// At least these specific versions of MSVC2010 has a severe performance problem with this file,
|
||||
// taking about 1 hour to compile if the portion making use of variadic macros is enabled.
|
||||
#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 160030319) && (_MSC_FULL_VER <= 160040219)
|
||||
# define TST_QMETATYPE_BROKEN_COMPILER
|
||||
#endif
|
||||
|
||||
// mingw gcc 4.8 also takes way too long, letting the CI system abort the test
|
||||
#if defined(__MINGW32__)
|
||||
# define TST_QMETATYPE_BROKEN_COMPILER
|
||||
|
@ -37,7 +37,7 @@
|
||||
# undef QT_ATOMIC_FORCE_CXX11
|
||||
# endif
|
||||
# elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && (__cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__))
|
||||
# elif defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# elif defined(_MSC_VER)
|
||||
// We need MSVC 2015 because of: atomics (2012), constexpr (2015), and unrestricted unions (2015).
|
||||
// Support for constexpr is not working completely on MSVC 2015 but it's enough for the test.
|
||||
# else
|
||||
|
@ -586,10 +586,7 @@ void tst_QVersionNumber::serialize()
|
||||
|
||||
void tst_QVersionNumber::moveSemantics()
|
||||
{
|
||||
#if defined(_MSC_VER) && _MSC_VER == 1600
|
||||
# define Q_MSVC_2010
|
||||
#endif
|
||||
#if defined(Q_COMPILER_RVALUE_REFS) && !defined(Q_MSVC_2010)
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
// QVersionNumber(QVersionNumber &&)
|
||||
{
|
||||
QVersionNumber v1(1, 2, 3);
|
||||
@ -613,7 +610,7 @@ void tst_QVersionNumber::moveSemantics()
|
||||
QCOMPARE(v1, v2);
|
||||
}
|
||||
#endif
|
||||
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(Q_MSVC_2010)
|
||||
#ifdef Q_COMPILER_REF_QUALIFIERS
|
||||
// normalized()
|
||||
{
|
||||
QVersionNumber v(1, 0, 0);
|
||||
@ -639,10 +636,8 @@ void tst_QVersionNumber::moveSemantics()
|
||||
QVERIFY(!segments.empty());
|
||||
}
|
||||
#endif
|
||||
#if !defined(Q_COMPILER_RVALUE_REFS) && !defined(Q_COMPILER_REF_QUALIFIERS) && !defined(Q_MSVC_2010)
|
||||
#if !defined(Q_COMPILER_RVALUE_REFS) && !defined(Q_COMPILER_REF_QUALIFIERS)
|
||||
QSKIP("This test requires C++11 move semantics support in the compiler.");
|
||||
#elif defined(Q_MSVC_2010)
|
||||
QSKIP("This test requires compiler generated move constructors and operators.");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1266,8 +1266,6 @@ void tst_Compiler::cxx11_rvalue_refs()
|
||||
QCOMPARE(s3, MoveDefinedQString("Hello"));
|
||||
}
|
||||
|
||||
// supported by MSVC only from November 2013 CTP, but only check for VC2015:
|
||||
# if !defined(Q_CC_MSVC) || defined(Q_CC_INTEL) || _MSC_VER >= 1900 // VS14 == VC2015
|
||||
// we require automatic generation of move special member functions:
|
||||
{
|
||||
struct M { MoveDefinedQString s1, s2; };
|
||||
@ -1288,7 +1286,6 @@ void tst_Compiler::cxx11_rvalue_refs()
|
||||
QCOMPARE(m3.s1, MoveDefinedQString("Hello"));
|
||||
QCOMPARE(m3.s2, MoveDefinedQString("World"));
|
||||
}
|
||||
# endif // MSVC < 2015
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -690,8 +690,8 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
|
||||
QList<QByteArray> res = splitLines(actualOutputs[n]);
|
||||
const QString expectedFileName = expectedFileNameFromTest(subdir, logger);
|
||||
QList<QByteArray> exp = expectedResult(expectedFileName);
|
||||
#if (defined (Q_CC_MSVC) && _MSC_VER < 1900)|| defined(Q_CC_MINGW)
|
||||
// MSVC up to MSVC2013, MinGW format double numbers differently
|
||||
#ifdef Q_CC_MINGW
|
||||
// MinGW formats double numbers differently
|
||||
if (n == 0 && subdir == QStringLiteral("float")) {
|
||||
for (int i = 0; i < exp.size(); ++i) {
|
||||
exp[i].replace("e-07", "e-007");
|
||||
|
Loading…
Reference in New Issue
Block a user