Added test case for #3466

This commit is contained in:
PKEuS 2012-04-25 21:14:25 +02:00
parent ebf89aa229
commit a4c4c66a4c
1 changed files with 8 additions and 0 deletions

View File

@ -208,6 +208,7 @@ private:
TEST_CASE(varid42); // ticket #3316 (varid for array) TEST_CASE(varid42); // ticket #3316 (varid for array)
TEST_CASE(varid43); TEST_CASE(varid43);
TEST_CASE(varid44); TEST_CASE(varid44);
TEST_CASE(varid45); // #3466
TEST_CASE(varid_cpp_keywords_in_c_code); TEST_CASE(varid_cpp_keywords_in_c_code);
TEST_CASE(varidFunctionCall1); TEST_CASE(varidFunctionCall1);
TEST_CASE(varidFunctionCall2); TEST_CASE(varidFunctionCall2);
@ -3197,6 +3198,13 @@ private:
tokenizeDebugListing(code)); tokenizeDebugListing(code));
} }
void varid45() { // #3466
const std::string code("void foo() { B b(this); A a(this, b); }");
ASSERT_EQUALS("\n\n##file 0\n"
"1: void foo ( ) { B b@1 ( this ) ; A a@2 ( this , b@1 ) ; }\n",
tokenizeDebugListing(code));
}
void varid_cpp_keywords_in_c_code() { void varid_cpp_keywords_in_c_code() {
const char code[] = "void f() {\n" const char code[] = "void f() {\n"
" delete d;\n" " delete d;\n"