From: <net...@us...> - 2002-12-30 15:02:06
|
Update of /cvsroot/cpptool/rfta/src/rftaparser In directory sc8-pr-cvs1:/tmp/cvs-serv19786/rfta/src/rftaparser Modified Files: VariableDeclMutatorTest.h VariableDeclMutatorTest.cpp Log Message: -- added a test for the array initializer bug Index: VariableDeclMutatorTest.h =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftaparser/VariableDeclMutatorTest.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** VariableDeclMutatorTest.h 12 Dec 2002 15:18:01 -0000 1.4 --- VariableDeclMutatorTest.h 30 Dec 2002 15:01:57 -0000 1.5 *************** *** 33,36 **** --- 33,37 ---- CPPUNIT_TEST( testVarDeclNoSemiColonEnding ); CPPUNIT_TEST( testThreeDeclWithSpaceBeforeInializer ); + CPPUNIT_TEST( testArrayInitializer ); CPPUNIT_TEST_SUITE_END(); *************** *** 56,60 **** void testTwoIntDecl(); void testTwoObjectConstruction(); ! void testTwoDeclSourceRanges(); void testMissinterpretedUnsupportedExpression1(); --- 57,61 ---- void testTwoIntDecl(); void testTwoObjectConstruction(); ! void testTwoDeclSourceRanges(); void testMissinterpretedUnsupportedExpression1(); *************** *** 63,66 **** --- 64,69 ---- void testVarDeclNoSemiColonEnding(); void testThreeDeclWithSpaceBeforeInializer(); + + void testArrayInitializer(); private: Index: VariableDeclMutatorTest.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftaparser/VariableDeclMutatorTest.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** VariableDeclMutatorTest.cpp 20 Dec 2002 08:39:41 -0000 1.12 --- VariableDeclMutatorTest.cpp 30 Dec 2002 15:01:59 -0000 1.13 *************** *** 473,476 **** --- 473,486 ---- } + void + VariableDeclMutatorTest::testArrayInitializer() + { + const std::string source( "int x1[2][3] = { { 1 , 2 , 3 } , { 4 , 5 , 6 } };" ); + SourceASTNodePtr sourceAST = RFTA_ASSERT_VARIABLE_DECL_MUTATOR_PASS( source ); + RFTA_ASSERT_VARIABLE_DECL_INIT( sourceAST, 0, + "int ", "", "x1", "[2][3]", + Testing::assign, "= { { 1 , 2 , 3 } , { 4 , 5 , 6 } }" ); + } + } // namespace Refactoring |