Commit b13519d5 authored by hjk's avatar hjk Committed by hjk
Browse files

preprocessor: add an example of a macro that generates code



Change-Id: I902ebd73e039b8c3f44eca456be87809d1e1d3a4
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 075153fc
#define DECLARE_CLASS(s) class s
DECLARE_CLASS(QString);
# 1 "data/macro_expand_1.cpp"
#gen true
# 1 "data/macro_expand_1.cpp"
class
#gen false
# 2 "data/macro_expand_1.cpp"
QString;
......@@ -677,6 +677,8 @@ void tst_Preprocessor::comparisons_data()
<< "macro_pounder_fn.c" << "" << "";
QTest::newRow("macro_expand")
<< "macro_expand.c" << "macro_expand.out.c" << "";
QTest::newRow("macro_expand_1")
<< "macro_expand_1.cpp" << "macro_expand_1.out.cpp" << "";
QTest::newRow("macro-test")
<< "macro-test.cpp" << "macro-test.out.cpp" << "";
QTest::newRow("empty-macro")
......
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