summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qarraydata
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2012-10-18 14:25:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-18 14:55:23 +0200
commit5c57d1eacb04b4fa6a5dd8b1299926e6c02ac602 (patch)
tree2e06cf6191182b845bd15b6e96a249361a2b479b /tests/auto/corelib/tools/qarraydata
parent8506850cc882b01352c207b8a2838a0c614323c8 (diff)
Test: remove QSKIP in tst_qarraydata
Instead omit the whole tests when appropriate. Change-Id: Id4ec171528d4b4d6849b2478ac4f4a2332789b55 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qarraydata')
-rw-r--r--tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
index 6f7937533a..ad7d8b2ab9 100644
--- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
+++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
@@ -87,8 +87,13 @@ private slots:
void fromRawData_data();
void fromRawData();
void literals();
+#if defined(Q_COMPILER_VARIADIC_MACROS) \
+ && (defined(Q_COMPILER_LAMBDA) || defined(Q_CC_GNU))
void variadicLiterals();
+#endif
+#ifdef Q_COMPILER_RVALUE_REFS
void rValueReferences();
+#endif
void grow();
};
@@ -1564,10 +1569,11 @@ void tst_QArrayData::literals()
}
}
-void tst_QArrayData::variadicLiterals()
-{
#if defined(Q_COMPILER_VARIADIC_MACROS) \
&& (defined(Q_COMPILER_LAMBDA) || defined(Q_CC_GNU))
+// Variadic Q_ARRAY_LITERAL need to be available in the current configuration.
+void tst_QArrayData::variadicLiterals()
+{
{
QArrayDataPointer<int> d =
Q_ARRAY_LITERAL(int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
@@ -1610,10 +1616,8 @@ void tst_QArrayData::variadicLiterals()
for (int i = 0; i < 7; ++i)
QCOMPARE(const_(v)[i], i);
}
-#else
- QSKIP("Variadic Q_ARRAY_LITERAL not available in current configuration.");
-#endif // defined(Q_COMPILER_VARIADIC_MACROS)
}
+#endif
#ifdef Q_COMPILER_RVALUE_REFS
// std::remove_reference is in C++11, but requires library support
@@ -1666,11 +1670,10 @@ struct CompilerHasCxx11ImplicitMoves
{
};
};
-#endif
+// RValue references need to be supported in the current configuration
void tst_QArrayData::rValueReferences()
{
-#ifdef Q_COMPILER_RVALUE_REFS
if (!CompilerHasCxx11ImplicitMoves::value())
QSKIP("Implicit move ctor not supported in current configuration");
@@ -1698,10 +1701,8 @@ void tst_QArrayData::rValueReferences()
QCOMPARE(v3.size(), size_t(1));
QCOMPARE(v3.front(), 42);
-#else
- QSKIP("RValue references are not supported in current configuration");
-#endif
}
+#endif
void tst_QArrayData::grow()
{