diff --git a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractExpression.rts b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractExpression.rts index ec68a962ec6..283b5f3c248 100644 --- a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractExpression.rts +++ b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractExpression.rts @@ -615,152 +615,6 @@ void Test::test() { bool b = invalid(); } -//!Extract int constant -//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest - -//@.config -filename=test.cpp -methodname=size - -//@test.h -class Test { - void test(); -}; - - -//= -class Test { - void test(); - int size(); -}; - - -//@test.cpp -#include "test.h" - -void Test::test() { - int i = /*$*/42/*$$*/; -} - -//= -#include "test.h" - -int Test::size() { - return 42; -} - -void Test::test() { - int i = size(); -} - -//!Extract char constant -//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest - -//@.config -filename=test.cpp -methodname=newline - -//@test.h -class Test { - void test(); -}; - - -//= -class Test { - void test(); - char newline(); -}; - - -//@test.cpp -#include "test.h" - -void Test::test() { - char nl = /*$*/'\n'/*$$*/; -} - -//= -#include "test.h" - -char Test::newline() { - return '\n'; -} - -void Test::test() { - char nl = newline(); -} - -//!Extract boolean true constant -//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest - -//@.config -filename=test.cpp -methodname=valid - -//@test.h -class Test { - void test(); -}; - - -//= -class Test { - void test(); - bool valid(); -}; - - -//@test.cpp -#include "test.h" - -void Test::test() { - bool b = /*$*/true/*$$*/; -} - -//= -#include "test.h" - -bool Test::valid() { - return true; -} - -void Test::test() { - bool b = valid(); -} - -//!Extract boolean false constant -//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest - -//@.config -filename=test.cpp -methodname=invalid - -//@test.h -class Test { - void test(); -}; -//= -class Test { - void test(); - bool invalid(); -}; -//@test.cpp -#include "test.h" - -void Test::test() { - bool b = /*$*/false/*$$*/; -} -//= -#include "test.h" - -bool Test::invalid() { - return false; -} - -void Test::test() { - bool b = invalid(); -} //!Extract expression with typedef Bug 331985 //#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest //@.config @@ -837,34 +691,3 @@ int main() { return i; } -//! Extract macro -//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest - -//@.config -filename=test.cpp -methodname=bar - -//@test.cpp -#define five 5 -#define ADD(a, b) a + b - -int main() { - int i = five; //comment3 - i = /*$*/ADD(i, five)/*$$*/; - - return i; -} -//= -#define five 5 -#define ADD(a, b) a + b - -int bar(int& i) { - return ADD(i, five); -} - -int main() { - int i = five; //comment3 - i = bar(i); - - return i; -} diff --git a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts index 514248dbf4e..06ad3de23a0 100644 --- a/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts +++ b/core/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts @@ -2207,7 +2207,6 @@ test::string toXML() { int main() { return 0; } - //= #include "testString.h" @@ -2224,111 +2223,6 @@ test::string toXML() { int main() { return 0; } - -//!Bug 248622: Extract function fails to extract several expressions; Selection at the end -//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest -//@.config -filename=Test.cpp -methodname=endTag -//@testString.h - -namespace test { - -class string { -public: - friend string operator+(const string& lhs, const string& rhs) { - return rhs; - } - - string operator+(const string& rhs) { return rhs; } - string(char* cp) {} - string() {}; -}; - -} - -//@Test.cpp -#include "testString.h" - -test::string toXML() { - test::string name; - name = "hello"; - return "<" + name + ">" + /*$*/""/*$$*/; -} - -int main() { - return 0; -} - -//= -#include "testString.h" - -const char endTag(test::string name) { - return ""; -} - -test::string toXML() { - test::string name; - name = "hello"; - return "<" + name + ">" + endTag(name); -} - -int main() { - return 0; -} - -//!Bug 248622: Extract function fails to extract several expressions; Selection in the middle -//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest -//@.config -filename=Test.cpp -methodname=exp -//@testString.h - -namespace test { - -class string { -public: - friend string operator+(const string& lhs, const string& rhs) { - return rhs; - } - - string operator+(const string& rhs) { return rhs; } - string(char* cp) {} - string() {}; -}; - -} - -//@Test.cpp -#include "testString.h" - -test::string toXML() { - test::string name; - name = "hello"; - return "<" + name + /*$*/">" + ""; -} - -int main() { - return 0; -} - -//= -#include "testString.h" - -const char exp() { - return ">" + ""; -} - -int main() { - return 0; -} - //!Bug#262000 refactoring "extract function" misinterprets artificial blocks //#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest //@.config @@ -2341,7 +2235,6 @@ int main(int argc, char** argv) { a++; }/*$$*/ } - //= void exp() { int a = 0; @@ -2353,7 +2246,6 @@ void exp() { int main(int argc, char** argv) { exp(); } - //!Bug#264712 Refactor extract function deletes comments in header //#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest //@.config