summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-26 11:49:57 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-27 06:12:09 +0200
commit238c3046134cf184c642d75e69fc2fb85a29e057 (patch)
tree257b45b31cc5716f98074b70a660c2f655332345 /tests
parenteeaf05155804dccfcd32adf78ccdf129b99c7708 (diff)
Remove obsolete MSVC workarounds from autotests.
Qt5 doesn't support MSVC versions before 2008, so workarounds for earlier versions are no longer required. Change-Id: I429feff99fe61d286637b960d92fd58962f8aefa Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp5
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp3
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp19
-rw-r--r--tests/auto/other/compiler/tst_compiler.cpp76
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp12
5 files changed, 0 insertions, 115 deletions
diff --git a/tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp b/tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp
index 5e5be42bdf..1ac878d81b 100644
--- a/tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp
+++ b/tests/auto/corelib/io/qfile/largefile/tst_largefile.cpp
@@ -436,11 +436,6 @@ void tst_LargeFile::streamPositioning()
{
QFETCH( qint64, position );
-#if defined(QT_LARGEFILE_SUPPORT) && defined(Q_CC_MSVC) && _MSC_VER < 1400
- if (position >= (qint64)1 << 31)
- QSKIP("MSVC 2003 doesn't have 64 bit versions of fseek/ftell.");
-#endif
-
stream_ = QT_FOPEN("qt_largefile.tmp", "rb");
QVERIFY( 0 != stream_ );
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 803b45c3b8..0501ff5a44 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1468,9 +1468,6 @@ void tst_QFile::largeUncFileSupport()
}
{
// 2) stdlib file handling.
-#if _MSC_VER <= 1310
- QSKIP("platform SDK for MSVC 2003 does not support large files");
-#endif
QFile file;
FILE *fh = fopen(QFile::encodeName(largeFile).data(), "rb");
QVERIFY(file.open(fh, QIODevice::ReadOnly));
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index 7d7a81232c..d81656325c 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -850,14 +850,7 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(baseptr.data() == aData);
QVERIFY(aData == baseptr.data());
-
-#if defined(Q_CC_MSVC) && _MSC_VER < 1400
- QEXPECT_FAIL("", "Compiler bug", Continue);
-#endif
QVERIFY(baseptr == aData);
-#if defined(Q_CC_MSVC) && _MSC_VER < 1400
- QEXPECT_FAIL("", "Compiler bug", Continue);
-#endif
QVERIFY(aData == baseptr);
}
check();
@@ -873,9 +866,6 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(ptr == baseptr);
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
-#if defined(Q_CC_MSVC) && _MSC_VER < 1400
- QEXPECT_FAIL("", "Compiler bug", Continue);
-#endif
QVERIFY(baseptr == aData);
}
check();
@@ -892,9 +882,6 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
-#if defined(Q_CC_MSVC) && _MSC_VER < 1400
- QEXPECT_FAIL("", "Compiler bug", Continue);
-#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -915,9 +902,6 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
-#if defined(Q_CC_MSVC) && _MSC_VER < 1400
- QEXPECT_FAIL("", "Compiler bug", Continue);
-#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -935,9 +919,6 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
-#if defined(Q_CC_MSVC) && _MSC_VER < 1400
- QEXPECT_FAIL("", "Compiler bug", Continue);
-#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp
index d7bcc0cd59..71c133a44e 100644
--- a/tests/auto/other/compiler/tst_compiler.cpp
+++ b/tests/auto/other/compiler/tst_compiler.cpp
@@ -49,34 +49,6 @@
#include "baseclass.h"
#include "derivedclass.h"
-#if defined(Q_CC_MSVC) && _MSC_VER < 1300
-#define MSVC6
-#endif
-
-#if defined(Q_CC_MSVC) && _MSC_VER == 1300
-#define MSVC2002
-#endif
-
-#if defined(MSVC6)
-# define DONT_TEST_TEMPLATE_METHODS
-# define DONT_TEST_TEMPLATE_CONSTRUCTORS
-# define DONT_TEST_METHOD_SPECIALIZATION
-# define DONT_TEST_CONSTRUCTOR_SPECIALIZATION
-# define DONT_TEST_STATIC_TEMPLATE_METHODS
-# define DONT_TEST_STATIC_TEMPLATE_METHOD_SPECIALIZATION
-# define DONT_TEST_STL_SORTING
-# define DONT_TEST_SIGNEDNESS
-#endif
-
-#if defined(MSVC2002)
-# define DONT_TEST_TEMPLATE_METHODS
-# define DONT_TEST_DETECT_ENUMS
-# define DONT_TEST_METHOD_SPECIALIZATION
-# define DONT_TEST_CONSTRUCTOR_SPECIALIZATION
-# define DONT_TEST_STATIC_TEMPLATE_METHOD_SPECIALIZATION
-# define DONT_TEST_STL_SORTING
-#endif
-
#if defined(Q_CC_HPACC)
# define DONT_TEST_TEMPLATE_CONSTRUCTORS
# define DONT_TEST_CONSTRUCTOR_SPECIALIZATION
@@ -94,31 +66,21 @@ class tst_Compiler : public QObject
Q_OBJECT
private slots:
-#ifndef DONT_TEST_TEMPLATE_METHODS
void template_methods();
-#endif
#ifndef DONT_TEST_TEMPLATE_CONSTRUCTORS
void template_constructors();
#endif
void template_subclasses();
-#ifndef DONT_TEST_METHOD_SPECIALIZATION
void methodSpecialization();
-#endif
#ifndef DONT_TEST_CONSTRUCTOR_SPECIALIZATION
void constructorSpecialization();
#endif
-#ifndef DONT_TEST_STATIC_TEMPLATE_METHODS
void staticTemplateMethods();
-#endif
-#ifndef DONT_TEST_STATIC_TEMPLATE_METHOD_SPECIALIZATION
void staticTemplateMethodSpecialization();
-#endif
#ifndef DONT_TEST_DATASTREAM_DETECTION
void detectDataStream();
#endif
-#ifndef DONT_TEST_DETECT_ENUMS
void detectEnums();
-#endif
void overrideCFunction();
#ifndef DONT_TEST_STL_SORTING
void stdSortQList();
@@ -126,14 +88,11 @@ private slots:
#endif
void templateCallOrder();
void virtualFunctionNoLongerPureVirtual();
-#ifndef DONT_TEST_SIGNEDNESS
void charSignedness() const;
-#endif
void privateStaticTemplateMember() const;
void staticConstUnionWithInitializerList() const;
};
-#ifndef DONT_TEST_TEMPLATE_METHODS
class TemplateMethodClass
{
public:
@@ -149,7 +108,6 @@ void tst_Compiler::template_methods()
QCOMPARE(t.foo<long>(), 42l);
QCOMPARE(t.foo<double>(), 42.0);
}
-#endif
#ifndef DONT_TEST_TEMPLATE_CONSTRUCTORS
class TemplateConstructorClass
@@ -192,7 +150,6 @@ void tst_Compiler::template_subclasses()
QCOMPARE(c2.convert(QRect(1, 2, 3, 4)), QRectF(QRect(1, 2, 3, 4)));
}
-#ifndef DONT_TEST_METHOD_SPECIALIZATION
class TemplateMethodClass2
{
public:
@@ -212,7 +169,6 @@ void tst_Compiler::methodSpecialization()
QCOMPARE(t.foo<long>(), 42l);
QCOMPARE(t.foo<double>(), 42.0);
}
-#endif
#ifndef DONT_TEST_CONSTRUCTOR_SPECIALIZATION
class TemplateConstructorClass2
@@ -239,7 +195,6 @@ void tst_Compiler::constructorSpecialization()
}
#endif
-#ifndef DONT_TEST_STATIC_TEMPLATE_METHODS
class StaticTemplateClass
{
public:
@@ -252,9 +207,7 @@ void tst_Compiler::staticTemplateMethods()
QCOMPARE(StaticTemplateClass::foo<int>(), 42);
QCOMPARE(StaticTemplateClass::foo<uint>(), 42u);
}
-#endif
-#ifndef DONT_TEST_STATIC_TEMPLATE_METHOD_SPECIALIZATION
class StaticTemplateClass2
{
public:
@@ -271,7 +224,6 @@ void tst_Compiler::staticTemplateMethodSpecialization()
QCOMPARE(StaticTemplateClass2::foo<uint>(), 42u);
QCOMPARE(StaticTemplateClass2::foo<double>(), 18.5);
}
-#endif
#ifndef DONT_TEST_DATASTREAM_DETECTION
/******* DataStream tester *********/
@@ -363,7 +315,6 @@ void tst_Compiler::detectDataStream()
}
#endif
-#ifndef DONT_TEST_DETECT_ENUMS
enum Enum1 { Foo = 0, Bar = 1 };
enum Enum2 {};
enum Enum3 { Something = 1 };
@@ -371,34 +322,11 @@ enum Enum3 { Something = 1 };
template <typename T> char QTypeInfoEnumHelper(T);
template <typename T> void *QTypeInfoEnumHelper(...);
-#if defined(MSVC6)
-
-template <int>
-struct QTestTypeInfoHelper
-{
- enum { IsE = 0 };
-};
-
-template <>
-struct QTestTypeInfoHelper<sizeof(void *)>
-{
- enum { IsE = 1 };
-};
-
-
-template <typename T>
-struct QTestTypeInfo
-{
- typedef typename QTestTypeInfoHelper<sizeof(QTypeInfoEnumHelper<T>(0))> TIHelper;
- enum { IsEnum = TIHelper::IsE };
-};
-#else
template <typename T>
struct QTestTypeInfo
{
enum { IsEnum = sizeof(QTypeInfoEnumHelper<T>(0)) == sizeof(void*) };
};
-#endif
void tst_Compiler::detectEnums()
{
@@ -418,7 +346,6 @@ void tst_Compiler::detectEnums()
QVERIFY(QTestTypeInfo<Qt::MatchFlag>::IsEnum);
QVERIFY(!QTestTypeInfo<Qt::MatchFlags>::IsEnum);
}
-#endif
static int indicator = 0;
@@ -541,8 +468,6 @@ void tst_Compiler::virtualFunctionNoLongerPureVirtual()
derivedClass.wasAPureVirtualFunction();
}
-// MS VC 6.0 instantiates the char function for type unsigned char.
-#ifndef DONT_TEST_SIGNEDNESS
template<typename T> const char *resolveCharSignedness();
template<>
@@ -569,7 +494,6 @@ void tst_Compiler::charSignedness() const
QCOMPARE("unsigned char", resolveCharSignedness<unsigned char>());
QCOMPARE("signed char", resolveCharSignedness<signed char>());
}
-#endif
class PrivateStaticTemplateMember
{
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 62d5a50c85..1ce6f0c4ef 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -71,11 +71,6 @@
#include "parse-boost.h"
#endif
-// No such thing as "long long" in Microsoft's compiler 13.0 and before
-#if defined Q_CC_MSVC && _MSC_VER <= 1310
-# define NOLONGLONG
-#endif
-
QT_USE_NAMESPACE
struct MyStruct {};
@@ -284,13 +279,11 @@ private slots:
inline void dummy2() MACRO_WITH_POSSIBLE_COMPILER_SPECIFIC_ATTRIBUTES const {}
inline void dummy3() const MACRO_WITH_POSSIBLE_COMPILER_SPECIFIC_ATTRIBUTES {}
-#ifndef NOLONGLONG
void slotWithULongLong(unsigned long long) {}
void slotWithULongLongP(unsigned long long*) {}
void slotWithULong(unsigned long) {}
void slotWithLongLong(long long) {}
void slotWithLong(long) {}
-#endif
void slotWithColonColonType(::Int::Type) {}
@@ -456,9 +449,7 @@ private slots:
void oldStyleCasts();
void warnOnExtraSignalSlotQualifiaction();
#endif
-#ifndef NOLONGLONG
void uLongLong();
-#endif
#if !defined(MOC_CROSS_COMPILED) && defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(QT_NO_PROCESS)
void inputFileNameWithDotsButNoExtension();
#endif
@@ -626,8 +617,6 @@ void tst_Moc::warnOnExtraSignalSlotQualifiaction()
}
#endif
-// long long doesn't work on MSVC6 & .NET 2002, also skipped on 2003 due to compiler version issue with moc
-#ifndef NOLONGLONG
void tst_Moc::uLongLong()
{
TestClass tst;
@@ -644,7 +633,6 @@ void tst_Moc::uLongLong()
idx = mobj->indexOfSlot("slotWithLongLong(long long)");
QVERIFY(idx != -1);
}
-#endif
// Only tested on linux/gcc. Not tested when cross-compiled.
#if !defined(MOC_CROSS_COMPILED) && defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(QT_NO_PROCESS)