summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-04-27 16:46:57 +0200
committerhjk <qthjk@ovi.com>2012-04-27 17:25:00 +0200
commit051c33517f5733498c906a9eca5dad77aacf3fa4 (patch)
treea6c0aa3042cac638dd67d60e97cf60baecfa9ec6 /tests
parent9092e70884247f0d4cb276be17f5e47e5d8c148d (diff)
downloadqt-creator-051c33517f5733498c906a9eca5dad77aacf3fa4.tar.gz
preprocessor test: code cosmetics
Change-Id: I67367e501c8f19cee9023e3782c6a9175b49c6c6 Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp35
1 files changed, 23 insertions, 12 deletions
diff --git a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
index b70ac21f10..fd97d143ac 100644
--- a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
+++ b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
@@ -669,13 +669,20 @@ void tst_Preprocessor::comparisons_data()
<< "identifier-expansion.4.cpp" << "identifier-expansion.4.out.cpp" << "";
QTest::newRow("identifier-expansion 5")
<< "identifier-expansion.5.cpp" << "identifier-expansion.5.out.cpp" << "";
- QTest::newRow("reserved 1") << "reserved.1.cpp" << "reserved.1.out.cpp" << "";
- QTest::newRow("recursive 1") << "recursive.1.cpp" << "recursive.1.out.cpp" << "";
- QTest::newRow("macro_pounder_fn") << "macro_pounder_fn.c" << "" << "";
- QTest::newRow("macro_expand") << "macro_expand.c" << "macro_expand.out.c" << "";
- QTest::newRow("macro-test") << "macro-test.cpp" << "macro-test.out.cpp" << "";
- QTest::newRow("empty-macro") << "empty-macro.cpp" << "empty-macro.out.cpp" << "";
- QTest::newRow("empty-macro 2") << "empty-macro.2.cpp" << "empty-macro.2.out.cpp" << "";
+ QTest::newRow("reserved 1")
+ << "reserved.1.cpp" << "reserved.1.out.cpp" << "";
+ QTest::newRow("recursive 1")
+ << "recursive.1.cpp" << "recursive.1.out.cpp" << "";
+ QTest::newRow("macro_pounder_fn")
+ << "macro_pounder_fn.c" << "" << "";
+ QTest::newRow("macro_expand")
+ << "macro_expand.c" << "macro_expand.out.c" << "";
+ QTest::newRow("macro-test")
+ << "macro-test.cpp" << "macro-test.out.cpp" << "";
+ QTest::newRow("empty-macro")
+ << "empty-macro.cpp" << "empty-macro.out.cpp" << "";
+ QTest::newRow("empty-macro 2")
+ << "empty-macro.2.cpp" << "empty-macro.2.out.cpp" << "";
}
void tst_Preprocessor::comparisons()
@@ -687,17 +694,21 @@ void tst_Preprocessor::comparisons()
QByteArray errors;
QByteArray preprocessed = preprocess(infile, &errors, infile == outfile);
-// DUMP_OUTPUT(preprocessed);
+ // DUMP_OUTPUT(preprocessed);
if (!outfile.isEmpty()) {
- QByteArray output____ = loadSource("data/"+outfile); // these weird underscores are here to make the name as long as "preprocessed", so the QCOMPARE error messages are nicely aligned.
+ // These weird underscores are here to make the name as long as
+ // "preprocessed", so the QCOMPARE error messages are nicely aligned.
+ QByteArray output____ = loadSource("data/" + outfile);
// QCOMPARE(preprocessed, output____);
- QCOMPARE(QString::fromUtf8(preprocessed.constData()), QString::fromUtf8(output____.constData()));
+ QCOMPARE(QString::fromUtf8(preprocessed.constData()),
+ QString::fromUtf8(output____.constData()));
}
if (!errorfile.isEmpty()) {
- QByteArray errorFileContents = loadSource("data/"+errorfile);
- QCOMPARE(QString::fromUtf8(errors.constData()), QString::fromUtf8(errorFileContents.constData()));
+ QByteArray errorFileContents = loadSource("data/" + errorfile);
+ QCOMPARE(QString::fromUtf8(errors.constData()),
+ QString::fromUtf8(errorFileContents.constData()));
}
}