From: <bl...@us...> - 2003-05-03 20:40:28
|
Update of /cvsroot/cpptool/rfta/src/rftaparser In directory sc8-pr-cvs1:/tmp/cvs-serv22545/src/rftaparser Modified Files: EnumBodyParserTest.cpp Log Message: * changed RFTA_ASSERT_NODE_HAS to support variable argument count and source range. Index: EnumBodyParserTest.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftaparser/EnumBodyParserTest.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EnumBodyParserTest.cpp 3 May 2003 17:43:44 -0000 1.1 --- EnumBodyParserTest.cpp 3 May 2003 20:40:22 -0000 1.2 *************** *** 83,87 **** SourceASTNodePtr source_Node = RFTA_ASSERT_PARSER_PASS2( EnumBodyParser, source_, source_.length() ); ASTNodePtr bodyNode = source_Node->getChildAt(0); ! RFTA_ASSERT_NODE_HAS( bodyNode, ASTNodeTypes::enumBody, 0, builder_->getSource().length() ); RFTA_ASSERT_EQUAL( constantCount, bodyNode->getChildCount() ); for ( int index =0; index < constantCount; ++index ) --- 83,91 ---- SourceASTNodePtr source_Node = RFTA_ASSERT_PARSER_PASS2( EnumBodyParser, source_, source_.length() ); ASTNodePtr bodyNode = source_Node->getChildAt(0); ! RFTA_ASSERT_NODE_HAS( bodyNode, ! ASTNodeTypes::enumBody, ! 0, ! builder_->getSource().length(), ! "enum-body node" ); RFTA_ASSERT_EQUAL( constantCount, bodyNode->getChildCount() ); for ( int index =0; index < constantCount; ++index ) *************** *** 102,111 **** ASTNodeTypes::enumConstant, builder_->getStartIndex(constantKey), ! builder_->getLength(constantKey) ); ASTNodePtr identifierNode = constantNode->getProperty( ASTNodeProperties::variableNameProperty ); RFTA_ASSERT_NODE_HAS( identifierNode, ASTNodeTypes::variableIdentifier, builder_->getStartIndex(identifierKey), ! builder_->getLength(identifierKey) ); if ( !builder_->hasKey( initializerKey ) ) CPPUNIT_ASSERT( !constantNode->hasProperty( ASTNodeProperties::variableInitializerProperty ) ); --- 106,117 ---- ASTNodeTypes::enumConstant, builder_->getStartIndex(constantKey), ! builder_->getLength(constantKey), ! constantKey ); ASTNodePtr identifierNode = constantNode->getProperty( ASTNodeProperties::variableNameProperty ); RFTA_ASSERT_NODE_HAS( identifierNode, ASTNodeTypes::variableIdentifier, builder_->getStartIndex(identifierKey), ! builder_->getLength(identifierKey), ! identifierKey ); if ( !builder_->hasKey( initializerKey ) ) CPPUNIT_ASSERT( !constantNode->hasProperty( ASTNodeProperties::variableInitializerProperty ) ); *************** *** 117,121 **** ASTNodeTypes::assignVariableInitializerExpression, builder_->getStartIndex( initializerKey ), ! builder_->getLength( initializerKey ) ); ASTNodePtr valueNode = initializerNode->getProperty( ASTNodeProperties::valueProperty ); --- 123,128 ---- ASTNodeTypes::assignVariableInitializerExpression, builder_->getStartIndex( initializerKey ), ! builder_->getLength( initializerKey ), ! initializerKey ); ASTNodePtr valueNode = initializerNode->getProperty( ASTNodeProperties::valueProperty ); *************** *** 124,128 **** ASTNodeTypes::valueExpression, builder_->getStartIndex( valueKey ), ! builder_->getLength( valueKey ) ); } } --- 131,136 ---- ASTNodeTypes::valueExpression, builder_->getStartIndex( valueKey ), ! builder_->getLength( valueKey ), ! valueKey ); } } |