forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.7'
Conflicts: src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
This commit is contained in:
@@ -318,6 +318,7 @@ private:
|
||||
private slots:
|
||||
void va_args();
|
||||
void named_va_args();
|
||||
void extra_va_args();
|
||||
void defined();
|
||||
void defined_data();
|
||||
void empty_macro_args();
|
||||
@@ -414,6 +415,23 @@ void tst_Preprocessor::named_va_args()
|
||||
QCOMPARE(simplified(preprocessed), QString("int f();int f(int a);int f(int a,int b);"));
|
||||
}
|
||||
|
||||
void tst_Preprocessor::extra_va_args()
|
||||
{
|
||||
Client *client = 0; // no client.
|
||||
Environment env;
|
||||
|
||||
Preprocessor preprocess(client, &env);
|
||||
QByteArray preprocessed = preprocess.run(QLatin1String("<stdin>"),
|
||||
"#define foo(ret, ...) ret f(__VA_ARGS__);\n"
|
||||
"\nfoo(int)\n"
|
||||
"\nfoo(float,int b)\n"
|
||||
"\nfoo(long,int b,int c)\n",
|
||||
true, false);
|
||||
|
||||
preprocessed = preprocessed.simplified();
|
||||
QCOMPARE(simplified(preprocessed), QString("int f();float f(int b);long f(int b,int c);"));
|
||||
}
|
||||
|
||||
void tst_Preprocessor::empty_macro_args()
|
||||
{
|
||||
Client *client = 0; // no client.
|
||||
|
Reference in New Issue
Block a user