From: <net...@us...> - 2002-12-30 13:57:26
|
Update of /cvsroot/cpptool/rfta/src/rfta In directory sc8-pr-cvs1:/tmp/cvs-serv7533/rfta/src/rfta Modified Files: InlineTempRefactoringTest.cpp Log Message: -- added some test for bugs Index: InlineTempRefactoringTest.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rfta/InlineTempRefactoringTest.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InlineTempRefactoringTest.cpp 30 Dec 2002 10:44:08 -0000 1.2 --- InlineTempRefactoringTest.cpp 30 Dec 2002 13:57:22 -0000 1.3 *************** *** 207,211 **** applyRefactoringNoThrow ( "if (x==1) ;" , "x" , CPPUNIT_SOURCELINE() ); applyRefactoringExpectThrow( "y=2,x=1;" , "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); ! applyRefactoringNoThrow ( "y=2,x==1;" , "x" , CPPUNIT_SOURCELINE() ); applyRefactoringExpectThrow( "int j = x = 2;", "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); // the following will fail because of incomplete expression parser: --- 207,211 ---- applyRefactoringNoThrow ( "if (x==1) ;" , "x" , CPPUNIT_SOURCELINE() ); applyRefactoringExpectThrow( "y=2,x=1;" , "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); ! applyRefactoringNoThrow ( "y+=x,y=2,x==1;" , "x" , CPPUNIT_SOURCELINE() ); applyRefactoringExpectThrow( "int j = x = 2;", "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); // the following will fail because of incomplete expression parser: *************** *** 214,217 **** --- 214,221 ---- applyRefactoringExpectThrow( "fct(x = 1);" , "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); applyRefactoringExpectThrow( "x++;" , "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); + applyRefactoringNoThrow ( "y[x]==1;" , "x" , CPPUNIT_SOURCELINE() ); + applyRefactoringNoThrow ( "*x == 1;" , "x" , CPPUNIT_SOURCELINE() ); + applyRefactoringExpectThrow( "*(x++);" , "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); + applyRefactoringExpectThrow( "&x = p;" , "x" , RefactoringError::variableIsAssigned , CPPUNIT_SOURCELINE() ); */ } |