diff options
author | Mike Krüger <mkrueger@novell.com> | 2011-05-18 12:47:02 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2011-05-18 12:47:02 +0400 |
commit | 2e78d530e9730735e0d1e7f8b6c012756bf08e25 (patch) | |
tree | 9745ad6b4eed3372b3efaf299a41b82722b39cd3 /main/tests | |
parent | f7881dacf586bc8bb90661093881d07b3e6da952 (diff) |
Fixed 'Bug 693944 - Extracted method returns void instead of the
correct type'.
Diffstat (limited to 'main/tests')
-rw-r--r-- | main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs b/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs index 3e2f39e240..e506447cb0 100644 --- a/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs +++ b/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs @@ -466,6 +466,36 @@ namespace MonoDevelop.Refactoring.Tests "); } + + /// <summary> + /// Bug 693944 - Extracted method returns void instead of the correct type + /// </summary> + [Test()] + public void TestBug693944 () + { + TestExtractMethod (@"class TestClass +{ + void TestMethod () + { + TestMethod (<-""Hello""->); + } +} +", @"class TestClass +{ + void TestMethod () + { + TestMethod (NewMethod ()); + } + + string NewMethod () + { + return ""Hello""; + } +} +"); + } + + /* Currently not possible to implement, would cause serve bugs: [Test()] public void ExtractMethodMultiVariableWithLocalReturnVariableTest () |