Added TODO test cases for template variables with multiple levels of pointer indirection

Following email from Robert Reif
This commit is contained in:
Pete Johns 2011-01-18 18:29:42 +11:00
parent 481907ef14
commit 69d4db714e
1 changed files with 17 additions and 0 deletions

View File

@ -63,6 +63,7 @@ private:
TEST_CASE(test_isVariableDeclarationIdentifiesArray);
TEST_CASE(test_isVariableDeclarationIdentifiesOfArrayPointers);
TEST_CASE(isVariableDeclarationIdentifiesTemplatedPointerVariable);
TEST_CASE(isVariableDeclarationIdentifiesTemplatedPointerToPointerVariable);
TEST_CASE(isVariableDeclarationIdentifiesTemplatedVariable);
TEST_CASE(isVariableDeclarationIdentifiesTemplatedVariableIterator);
TEST_CASE(isVariableDeclarationIdentifiesNestedTemplateVariable);
@ -223,6 +224,22 @@ private:
ASSERT_EQUALS("set", typetok->str());
}
void isVariableDeclarationIdentifiesTemplatedPointerToPointerVariable()
{
reset();
givenACodeSampleToTokenize var("std::deque<int>*** ints;");
bool result = si.isVariableDeclaration(var.tokens(), vartok, typetok);
TODO_ASSERT_EQUALS(true, result);
if (NULL != vartok)
{
TODO_ASSERT_EQUALS("ints", vartok->str());
}
if (NULL != typetok)
{
TODO_ASSERT_EQUALS("deque", typetok->str());
}
}
void isVariableDeclarationIdentifiesTemplatedVariable()
{
reset();