summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-27 18:59:23 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-28 14:07:56 (GMT)
commit096a0088aa75010c71a2a39dee5f3ee00d23fcf7 (patch)
tree0fe23775f3c1b845dc9553621adf5caaae37d697 /tests
parent657044cefa87d092213308f2706c3770fb916eb7 (diff)
downloadQt-096a0088aa75010c71a2a39dee5f3ee00d23fcf7.zip
Qt-096a0088aa75010c71a2a39dee5f3ee00d23fcf7.tar.gz
Qt-096a0088aa75010c71a2a39dee5f3ee00d23fcf7.tar.bz2
Disable the forwardDeclared1 test with SunCC: it doesn't work
I added this test because I thought that the compiler would find the forward-declarations due to the "one definition" rule. In hindsight, it's not a good idea. Sun CC warns about this, gcc doesn't. With Sun CC, the code leaks, with gcc it doesn't.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index dd53e3c..ae5155e 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -231,6 +231,9 @@ extern int forwardDeclaredDestructorRunCount;
void tst_QSharedPointer::forwardDeclaration1()
{
+#if defined(Q_CC_SUN)
+ QSKIP("This type of forward declaration is not valid with this compiler", SkipAll);
+#else
externalForwardDeclaration();
struct Wrapper { QSharedPointer<ForwardDeclared> pointer; };
@@ -242,6 +245,7 @@ void tst_QSharedPointer::forwardDeclaration1()
QVERIFY(!w.pointer.isNull());
}
QCOMPARE(forwardDeclaredDestructorRunCount, 1);
+#endif
}
#include "forwarddeclared.h"