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();
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();
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);
}
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);
}
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);
}
#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
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();
#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:
QCOMPARE(t.foo<long>(), 42l);
QCOMPARE(t.foo<double>(), 42.0);
}
-#endif
#ifndef DONT_TEST_TEMPLATE_CONSTRUCTORS
class TemplateConstructorClass
QCOMPARE(c2.convert(QRect(1, 2, 3, 4)), QRectF(QRect(1, 2, 3, 4)));
}
-#ifndef DONT_TEST_METHOD_SPECIALIZATION
class TemplateMethodClass2
{
public:
QCOMPARE(t.foo<long>(), 42l);
QCOMPARE(t.foo<double>(), 42.0);
}
-#endif
#ifndef DONT_TEST_CONSTRUCTOR_SPECIALIZATION
class TemplateConstructorClass2
}
#endif
-#ifndef DONT_TEST_STATIC_TEMPLATE_METHODS
class StaticTemplateClass
{
public:
QCOMPARE(StaticTemplateClass::foo<int>(), 42);
QCOMPARE(StaticTemplateClass::foo<uint>(), 42u);
}
-#endif
-#ifndef DONT_TEST_STATIC_TEMPLATE_METHOD_SPECIALIZATION
class StaticTemplateClass2
{
public:
QCOMPARE(StaticTemplateClass2::foo<uint>(), 42u);
QCOMPARE(StaticTemplateClass2::foo<double>(), 18.5);
}
-#endif
#ifndef DONT_TEST_DATASTREAM_DETECTION
/******* DataStream tester *********/
}
#endif
-#ifndef DONT_TEST_DETECT_ENUMS
enum Enum1 { Foo = 0, Bar = 1 };
enum Enum2 {};
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()
{
QVERIFY(QTestTypeInfo<Qt::MatchFlag>::IsEnum);
QVERIFY(!QTestTypeInfo<Qt::MatchFlags>::IsEnum);
}
-#endif
static int indicator = 0;
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<>
QCOMPARE("unsigned char", resolveCharSignedness<unsigned char>());
QCOMPARE("signed char", resolveCharSignedness<signed char>());
}
-#endif
class PrivateStaticTemplateMember
{
#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 {};
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) {}
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
}
#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;
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)