preprocessor: Added todo test. It crashes when it's used

This commit is contained in:
Daniel Marjamäki 2009-01-21 07:22:44 +00:00
parent 001a4b588e
commit 1622922384
1 changed files with 12 additions and 0 deletions

View File

@ -80,6 +80,7 @@ private:
TEST_CASE(preprocessor_undef);
TEST_CASE(preprocessor_doublesharp);
TEST_CASE(preprocessor_include_in_str);
// TODO TEST_CASE(fmt);
}
@ -559,6 +560,17 @@ private:
ASSERT_EQUALS(1, actual.size());
ASSERT_EQUALS("int main()\n{\nconst char *a = \"#include <string>\n\";\nreturn 0;\n}\n", actual[""]);
}
void fmt()
{
const char filedata[] = "#define DBG(fmt...) printf(fmt);\n"
"DBG(\"[0x%lx-0x%lx)\", pstart, pend);";
// Preprocess..
std::string actual = Preprocessor::expandMacros(filedata);
}
};
REGISTER_TEST(TestPreprocessor)