|
|
|
|
@ -28,6 +28,7 @@
@@ -28,6 +28,7 @@
|
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.IO; |
|
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
|
|
using NUnit.Framework; |
|
|
|
|
using ICSharpCode.NRefactory.TypeSystem.Implementation; |
|
|
|
|
@ -1697,23 +1698,59 @@ class A
@@ -1697,23 +1698,59 @@ class A
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Bug 2793 - op_Equality should not be offered in the completion list
|
|
|
|
|
/// Bug 3370 -MD ignores member hiding
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Test()] |
|
|
|
|
public void Test2793 () |
|
|
|
|
public void TestBug3370 () |
|
|
|
|
{ |
|
|
|
|
CombinedProviderTest ( |
|
|
|
|
@"
|
|
|
|
|
class A |
|
|
|
|
{ |
|
|
|
|
public static void Main (string[] args) |
|
|
|
|
{ |
|
|
|
|
$System.Action.$ |
|
|
|
|
} |
|
|
|
|
$public override $ |
|
|
|
|
} |
|
|
|
|
", provider => {
|
|
|
|
|
Assert.IsNull (provider.Find ("op_Equality"), "'op_Equality' found."); |
|
|
|
|
Assert.IsNull (provider.Find ("op_Inequality"), "'op_Inequality' found."); |
|
|
|
|
Assert.IsNotNull (provider.Find ("ToString"), "'ToString' not found."); |
|
|
|
|
Assert.IsNull (provider.Find ("Finalize"), "'Finalize' found."); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Bug 2793 - op_Equality should not be offered in the completion list
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Test()] |
|
|
|
|
public void Test2793 () |
|
|
|
|
{ |
|
|
|
|
CombinedProviderTest ( |
|
|
|
|
@"
|
|
|
|
|
using System; |
|
|
|
|
|
|
|
|
|
public class MyClass |
|
|
|
|
{ |
|
|
|
|
public class A |
|
|
|
|
{ |
|
|
|
|
public event EventHandler MouseClick; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class B : A |
|
|
|
|
{ |
|
|
|
|
public new event EventHandler MouseClick; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class C : B |
|
|
|
|
{ |
|
|
|
|
public new void MouseClick () |
|
|
|
|
{ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static public void Main () |
|
|
|
|
{ |
|
|
|
|
C myclass = new C (); |
|
|
|
|
$myclass.$ |
|
|
|
|
} |
|
|
|
|
}", provider => {
|
|
|
|
|
Assert.AreEqual (1, provider.Data.Where(c => c.DisplayText == "MouseClick").Count ()); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|