Tests: avoid use of stderr as name for variables and objects
On CYGWIN, I configured with -developer-build option and the build process fails at this point: qtbase/tests/auto/tools/moc/tst_moc.cpp: In member function ‘void tst_Moc::initTestCase()’: qtbase/tests/auto/tools/moc/tst_moc.cpp:940:9: error: expected primary-expression before ‘const’ 940 | const QByteArray stderr = p.readAllStandardError(); \ | ^~~~~ qtbase/tests/auto/tools/moc/tst_moc.cpp:941:25: error: request for member ‘isEmpty’ in ‘__getreent()->_reent::_stderr’, which is of pointer type ‘__FILE*’ (maybe you meant to use ‘->’ ?) 941 | QVERIFY2(stderr.isEmpty(), stderr.data()); \ | ^~~~~~~ It looks like that it doesn't like to use stderr word in that manner. Inside VERIFY_NO_ERRORS macro, I just renamed stderr to standardError and the problem was solved. Change-Id: I21e5a785b35db518efffccecf796b88c78ebc725 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
05d090b8e7
commit
48573ddda3
@ -936,8 +936,8 @@ private:
|
||||
|
||||
#define VERIFY_NO_ERRORS(proc) do { \
|
||||
auto &&p = proc; \
|
||||
const QByteArray stderr = p.readAllStandardError(); \
|
||||
QVERIFY2(stderr.isEmpty(), stderr.data()); \
|
||||
const QByteArray standardError = p.readAllStandardError(); \
|
||||
QVERIFY2(standardError.isEmpty(), standardError.data()); \
|
||||
QCOMPARE(p.exitCode(), 0); \
|
||||
} while (false)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user