From 69d4db714ee43d89d7110101f945e59ea0915656 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Tue, 18 Jan 2011 18:29:42 +1100 Subject: [PATCH] Added TODO test cases for template variables with multiple levels of pointer indirection Following email from Robert Reif --- test/testsymboldatabase.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 98e80671e..b63cc4088 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -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*** 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();