Update of /cvsroot/cpptool/rfta/src/rftaparser
In directory sc8-pr-cvs1:/tmp/cvs-serv23887/src/rftaparser
Modified Files:
UnparsedDeclarationListMutatorTest.cpp
Log Message:
* fixed some assertions
Index: UnparsedDeclarationListMutatorTest.cpp
===================================================================
RCS file: /cvsroot/cpptool/rfta/src/rftaparser/UnparsedDeclarationListMutatorTest.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** UnparsedDeclarationListMutatorTest.cpp 29 Apr 2003 09:56:21 -0000 1.3
--- UnparsedDeclarationListMutatorTest.cpp 1 May 2003 21:13:29 -0000 1.4
***************
*** 97,103 ****
source << "private: ";
source.addKeyed("MEMBER", "int fc2() { return 0; }") << " ";
! source << "protected: signal:";
source.setKeyEnd("CLASS-BODY");
! source << "};";
SourceASTNodePtr sourceNode = SourceASTNode::create( source, source );
--- 97,105 ----
source << "private: ";
source.addKeyed("MEMBER", "int fc2() { return 0; }") << " ";
! source << "protected: ";
! source << "signals: ";
! source << "}";
source.setKeyEnd("CLASS-BODY");
! source << ";";
SourceASTNodePtr sourceNode = SourceASTNode::create( source, source );
***************
*** 106,110 ****
ParseContext context(sourceNode);
DeclarationParser parser(context, sourceNode->getBlankedSourceStart(), sourceNode->getBlankedSourceEnd());
! parser.tryParse();
// mutate declaration:
--- 108,112 ----
ParseContext context(sourceNode);
DeclarationParser parser(context, sourceNode->getBlankedSourceStart(), sourceNode->getBlankedSourceEnd());
! CPPUNIT_ASSERT( parser.tryParse() );
// mutate declaration:
***************
*** 116,122 ****
sourceNode );
! CppUnit::Message message( "Parser failed",
! "Source:\n" + source.asString() );
! CppUnit::Asserter::failIf( !detailsparser.tryParse(), message, CPPUNIT_SOURCELINE() );
--- 118,122 ----
sourceNode );
! CPPUNIT_ASSERT( detailsparser.tryParse() );
***************
*** 147,151 ****
RFTA_ASSERT_NODE_TYPE( classBody, ASTNodeTypes::declarationList );
RFTA_ASSERT_EQUAL( 3, classBody->getChildCount() );
-
RFTA_ASSERT_NODE_HAS( classBody->getChildAt(0),
ASTNodeTypes::unparsedDeclaration,
--- 147,150 ----
***************
*** 156,165 ****
source.getKeyedIndex("MEMBER",1),
source.getKeyedLen("MEMBER",1) );
RFTA_ASSERT_NODE_HAS( classBody->getChildAt(2),
ASTNodeTypes::functionImplementation,
source.getKeyedIndex("MEMBER",2),
source.getKeyedLen("MEMBER",2) );
-
-
}
--- 155,163 ----
source.getKeyedIndex("MEMBER",1),
source.getKeyedLen("MEMBER",1) );
+
RFTA_ASSERT_NODE_HAS( classBody->getChildAt(2),
ASTNodeTypes::functionImplementation,
source.getKeyedIndex("MEMBER",2),
source.getKeyedLen("MEMBER",2) );
}
|