diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2012-02-15 15:20:03 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2012-02-15 15:20:03 +0400 |
commit | a97225027ad81031bba3af1f39bc724f2c6d1ec5 (patch) | |
tree | c50315ff922012f3e5f7ee8297cd55f77a77dfb0 /main/tests/UnitTests | |
parent | 16b7d5ef223fa9f89dcf9d6e1a4d760ebce41295 (diff) |
[Refactoring] Worked on implement interface bug.
Diffstat (limited to 'main/tests/UnitTests')
-rw-r--r-- | main/tests/UnitTests/Makefile.am | 1 | ||||
-rw-r--r-- | main/tests/UnitTests/MonoDevelop.Refactoring/ImplementInterfaceTests.cs | 31 |
2 files changed, 31 insertions, 1 deletions
diff --git a/main/tests/UnitTests/Makefile.am b/main/tests/UnitTests/Makefile.am index a7fca49304..30e085dc73 100644 --- a/main/tests/UnitTests/Makefile.am +++ b/main/tests/UnitTests/Makefile.am @@ -82,6 +82,7 @@ FILES = \ MonoDevelop.Projects/TestProjectsChecks.cs \ MonoDevelop.Projects/TextFormatterTests.cs \ MonoDevelop.Projects/WorkspaceTests.cs \ + MonoDevelop.Refactoring/ImplementInterfaceTests.cs \ MonoDevelop.VersionControl.Git/GitUtilsTests.cs \ MonoDevelop.VersionControl.Views/EditorCompareWidgetBaseTest.cs \ TestBase.cs \ diff --git a/main/tests/UnitTests/MonoDevelop.Refactoring/ImplementInterfaceTests.cs b/main/tests/UnitTests/MonoDevelop.Refactoring/ImplementInterfaceTests.cs index 377c8f52c9..af67772589 100644 --- a/main/tests/UnitTests/MonoDevelop.Refactoring/ImplementInterfaceTests.cs +++ b/main/tests/UnitTests/MonoDevelop.Refactoring/ImplementInterfaceTests.cs @@ -72,7 +72,8 @@ namespace MonoDevelop.Refactoring generated = generated.Substring (generated.IndexOf ("implementation") + "implementation".Length); generated = generated.Substring (0, generated.LastIndexOf ("#")); generated = generated.Trim (); - System.Console.WriteLine (generated); + if (outputString != generated) + Console.WriteLine (generated); Assert.AreEqual (outputString, generated); } @@ -164,6 +165,34 @@ interface ITest { throw new System.NotImplementedException (); }", "public void Method2 () {}"); } + + /// <summary> + /// Bug 3365 - MD cannot implement IEnumerable interface correctly - MD cannot implement IEnumerable interface correctly + /// </summary> + [Test()] + public void TestBug3365 () + { + TestCreateInterface (@"using System; +public interface IA +{ + bool GetEnumerator (); +} + +public interface ITest : IA, IEnumerable +{ +} +", @"public bool IA.GetEnumerator () + { + throw new System.NotImplementedException (); + } + #endregion + + #region IEnumerable implementation + IEnumerator IEnumerable.GetEnumerator () + { + throw new System.NotImplementedException (); + }"); + } } } |