From: <bl...@us...> - 2003-05-28 07:13:28
|
Update of /cvsroot/cpptool/rfta/src/rftaparser In directory sc8-pr-cvs1:/tmp/cvs-serv7708/src/rftaparser Modified Files: CPPParserTest.cpp CPPParserTest.h Log Message: * added test to check that the node type returned by getFunctionAt() is 'function implementation' Index: CPPParserTest.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftaparser/CPPParserTest.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CPPParserTest.cpp 16 May 2003 19:55:02 -0000 1.4 --- CPPParserTest.cpp 28 May 2003 07:13:24 -0000 1.5 *************** *** 7,10 **** --- 7,11 ---- #include "CPPParserTest.h" #include <rfta/parser/CPPParser.h> + #include <rfta/parser/ASTNodes.h> *************** *** 45,48 **** --- 46,50 ---- int selectionIndex = source.getKeyedIndex( selectionKey_, 0 ); ASTNodePtr functionNode = parser.parseForFunctionBodyAt( selectionIndex ); + RFTA_ASSERT_NODE_TYPE( functionNode, ASTNodeTypes::functionImplementation, "function node" ); CPPUNIT_ASSERT_MESSAGE( "Failed to find function implementation node", functionNode ); CPPUNIT_ASSERT( functionNode->getRange().contains( SourceRange( selectionIndex, 0 ) ) ); Index: CPPParserTest.h =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftaparser/CPPParserTest.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CPPParserTest.h 3 May 2003 17:43:12 -0000 1.2 --- CPPParserTest.h 28 May 2003 07:13:24 -0000 1.3 *************** *** 6,10 **** #define RFTA_CPPPARSERTEST_H ! #include "UnitTesting.h" #include "KeyedString.h" --- 6,10 ---- #define RFTA_CPPPARSERTEST_H ! #include "ParserTesting.h" #include "KeyedString.h" |