Update of /cvsroot/cpptool/rfta/src/rftaparser
In directory sc8-pr-cvs1:/tmp/cvs-serv31200/src/rftaparser
Modified Files:
DeclarationParserTest.cpp DeclarationParserTest.h
Log Message:
* added test for class forward declaration
Index: DeclarationParserTest.cpp
===================================================================
RCS file: /cvsroot/cpptool/rfta/src/rftaparser/DeclarationParserTest.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DeclarationParserTest.cpp 30 Apr 2003 22:13:59 -0000 1.6
--- DeclarationParserTest.cpp 1 May 2003 19:04:31 -0000 1.7
***************
*** 233,236 ****
--- 233,253 ----
}
+
+ void
+ DeclarationParserTest::testClassForwardDeclaration()
+ {
+ const std::string source( " class X; " );
+ int startIndex = 1;
+ int endIndex = source.length()-1;
+ SourceASTNodePtr sourceAST = RFTA_ASSERT_PARSER_PASS( DeclarationParser,
+ source,
+ source.length()-1 );
+ RFTA_ASSERT_NODE_HAS( sourceAST->getChildAt(0),
+ ASTNodeTypes::unparsedDeclaration,
+ startIndex,
+ endIndex-startIndex );
+ }
+
+
void
DeclarationParserTest::testTemplateClass()
Index: DeclarationParserTest.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/src/rftaparser/DeclarationParserTest.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DeclarationParserTest.h 30 Apr 2003 22:13:59 -0000 1.4
--- DeclarationParserTest.h 1 May 2003 19:04:32 -0000 1.5
***************
*** 28,31 ****
--- 28,32 ----
CPPUNIT_TEST( testFunctionbody );
CPPUNIT_TEST( testClassDeclaration );
+ CPPUNIT_TEST( testClassForwardDeclaration );
CPPUNIT_TEST( testTemplateClass );
CPPUNIT_TEST( testTemplateFuntion );
***************
*** 55,58 ****
--- 56,60 ----
void testFunctionbody();
void testClassDeclaration();
+ void testClassForwardDeclaration();
void testTemplateClass();
void testTemplateFuntion();
|