From 9daa34003dd64df6795b781cf0286f9e6c71b7dc Mon Sep 17 00:00:00 2001 From: Leandro Melo Date: Wed, 13 Jun 2012 09:50:39 +0200 Subject: [PATCH] Revert "C++: Re-enable macro definition line test" This reverts commit 44d8e7bef705810ade0e4b5532c47a82b11294eb. 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: hjk Reviewed-by: Francois Ferrand --- .../cplusplus/preprocessor/tst_preprocessor.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp index b5cb82649d4..bc33d434579 100644 --- a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp +++ b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp @@ -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(""), QByteArray("#define foo(ARGS) int f(ARGS)\n" "foo(int a);\n")); - QVERIFY(preprocessed.contains("#gen true\n# 1 \"\"\nint f")); + QVERIFY(preprocessed.contains("#gen true\n# 2 \"\"\nint f")); preprocessed = preprocess.run(QLatin1String(""), QByteArray("#define foo(ARGS) int f(ARGS)\n" "foo(int a)\n" ";\n")); - QVERIFY(preprocessed.contains("#gen true\n# 1 \"\"\nint f")); + QVERIFY(preprocessed.contains("#gen true\n# 2 \"\"\nint f")); preprocessed = preprocess.run(QLatin1String(""), QByteArray("#define foo(ARGS) int f(ARGS)\n" "foo(int \n" " a);\n")); - QVERIFY(preprocessed.contains("#gen true\n# 1 \"\"\nint f")); + QVERIFY(preprocessed.contains("#gen true\n# 2 \"\"\nint f")); preprocessed = preprocess.run(QLatin1String(""), QByteArray("#define foo int f\n" "foo;\n")); - QVERIFY(preprocessed.contains("#gen true\n# 1 \"\"\nint f")); + QVERIFY(preprocessed.contains("#gen true\n# 2 \"\"\nint f")); preprocessed = preprocess.run(QLatin1String(""), QByteArray("#define foo int f\n" "foo\n" ";\n")); - QVERIFY(preprocessed.contains("#gen true\n# 1 \"\"\nint f")); + QVERIFY(preprocessed.contains("#gen true\n# 2 \"\"\nint f")); } void tst_Preprocessor::objmacro_expanding_as_fnmacro_notification()