Added test case preprocessor_doublesharp, executed ./runastyle for errormessage.h
This commit is contained in:
parent
2b2152919f
commit
df5adc5f4f
|
@ -78,6 +78,7 @@ private:
|
|||
TEST_CASE(string1);
|
||||
TEST_CASE(string2);
|
||||
TEST_CASE(preprocessor_undef);
|
||||
// TODO TEST_CASE(preprocessor_doublesharp);
|
||||
TEST_CASE(preprocessor_include_in_str);
|
||||
}
|
||||
|
||||
|
@ -523,6 +524,23 @@ private:
|
|||
ASSERT_EQUALS("\n\n\nchar b=0;\n", Preprocessor::expandMacros(filedata));
|
||||
}
|
||||
|
||||
void preprocessor_doublesharp()
|
||||
{
|
||||
const char filedata[] = "#define TEST(var,val) var = val\n"
|
||||
"TEST(foo,20);\n";
|
||||
|
||||
// Compare results..
|
||||
ASSERT_EQUALS("\nfoo=20;\n", Preprocessor::expandMacros(filedata));
|
||||
|
||||
const char filedata2[] = "#define TEST(var,val) var##_##val = val\n"
|
||||
"TEST(foo,20);\n";
|
||||
|
||||
// Compare results..
|
||||
ASSERT_EQUALS("\nfoo_20=20;\n", Preprocessor::expandMacros(filedata2));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void preprocessor_include_in_str()
|
||||
{
|
||||
const char filedata[] = "int main()\n"
|
||||
|
|
Loading…
Reference in New Issue