Commit 9daa3400 authored by Leandro Melo's avatar Leandro Melo Committed by hjk
Browse files

Revert "C++: Re-enable macro definition line test"

This reverts commit 44d8e7be

.

The original test case was actually right. I guess I was mislead
by the recently added preprocessor tests, which are the ones
that should be corrected (together with the preprocessor, which
seems to have issues with # lineno generation).

Conflicts:

	tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp

Change-Id: I47f82ed23a37086d0d81c4b3ea2cac48fb753451
Reviewed-by: default avatarhjk <qthjk@ovi.com>
Reviewed-by: default avatarFrancois Ferrand <thetypz@gmail.com>
parent f978400a
......@@ -300,6 +300,9 @@ protected:
}
static QString simplified(QByteArray buf);
private /* not corrected yet */:
void macro_definition_lineno();
private slots:
void defined();
void defined_data();
......@@ -310,7 +313,6 @@ private slots:
void macro_args_count();
void invalid_param_count();
void objmacro_expanding_as_fnmacro_notification();
void macro_definition_lineno();
void macro_uses();
void macro_uses_lines();
void macro_arguments_notificatin();
......@@ -540,30 +542,30 @@ void tst_Preprocessor::macro_definition_lineno()
QByteArray preprocessed = preprocess.run(QLatin1String("<stdin>"),
QByteArray("#define foo(ARGS) int f(ARGS)\n"
"foo(int a);\n"));
QVERIFY(preprocessed.contains("#gen true\n# 1 \"<stdin>\"\nint f"));
QVERIFY(preprocessed.contains("#gen true\n# 2 \"<stdin>\"\nint f"));
preprocessed = preprocess.run(QLatin1String("<stdin>"),
QByteArray("#define foo(ARGS) int f(ARGS)\n"
"foo(int a)\n"
";\n"));
QVERIFY(preprocessed.contains("#gen true\n# 1 \"<stdin>\"\nint f"));
QVERIFY(preprocessed.contains("#gen true\n# 2 \"<stdin>\"\nint f"));
preprocessed = preprocess.run(QLatin1String("<stdin>"),
QByteArray("#define foo(ARGS) int f(ARGS)\n"
"foo(int \n"
" a);\n"));
QVERIFY(preprocessed.contains("#gen true\n# 1 \"<stdin>\"\nint f"));
QVERIFY(preprocessed.contains("#gen true\n# 2 \"<stdin>\"\nint f"));
preprocessed = preprocess.run(QLatin1String("<stdin>"),
QByteArray("#define foo int f\n"
"foo;\n"));
QVERIFY(preprocessed.contains("#gen true\n# 1 \"<stdin>\"\nint f"));
QVERIFY(preprocessed.contains("#gen true\n# 2 \"<stdin>\"\nint f"));
preprocessed = preprocess.run(QLatin1String("<stdin>"),
QByteArray("#define foo int f\n"
"foo\n"
";\n"));
QVERIFY(preprocessed.contains("#gen true\n# 1 \"<stdin>\"\nint f"));
QVERIFY(preprocessed.contains("#gen true\n# 2 \"<stdin>\"\nint f"));
}
void tst_Preprocessor::objmacro_expanding_as_fnmacro_notification()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment