From afc718f1f21fd34a23e34af9b8a83eb55ae26f34 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 9 Oct 2009 11:06:21 +0200 Subject: Autotest: fix forward-declaration test. The problem was that we forward-declared as struct, but the function was implemented as class. It's different on MSVC. Reviewed-by: Trust Me --- tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 58eaacb..46ec035 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -1701,7 +1701,7 @@ void tst_QSharedPointer::invalidConstructs() "struct DerivedData: public Data { int j; };\n" "\n" "extern int forwardDeclaredDestructorRunCount;\n" - "struct ForwardDeclared;\n" + "class ForwardDeclared;\n" "ForwardDeclared *forwardPointer();\n" ); @@ -1730,6 +1730,10 @@ void tst_QSharedPointer::invalidConstructs() bool result = (test.*testFunction)(body); if (qgetenv("QTEST_EXTERNAL_DEBUG").toInt() > 0) { qDebug("External test output:"); +#ifdef Q_CC_MSVC + // MSVC prints errors to stdout + printf("%s\n", test.standardOutput().constData()); +#endif printf("%s\n", test.standardError().constData()); } if (!result) { -- cgit v0.12