From 096a0088aa75010c71a2a39dee5f3ee00d23fcf7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 27 Jul 2009 20:59:23 +0200 Subject: 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. --- tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 pointer; }; @@ -242,6 +245,7 @@ void tst_QSharedPointer::forwardDeclaration1() QVERIFY(!w.pointer.isNull()); } QCOMPARE(forwardDeclaredDestructorRunCount, 1); +#endif } #include "forwarddeclared.h" -- cgit v0.12