Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@novell.com>2011-03-30 12:19:07 +0400
committerMike Krüger <mkrueger@novell.com>2011-03-30 12:19:07 +0400
commite018428edaedcd82534ddf235a8a43ed5a1dcbac (patch)
tree8c52d720aaeca6f2c08492784e5d849133ae793b /main/tests
parent4681852c917643cc23cb4b903c497e036c56caf7 (diff)
Fixed bug in code completion in methods that have a default parameter.
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/UnitTests/MonoDevelop.CSharpBinding/CodeCompletionCSharp3Tests.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/main/tests/UnitTests/MonoDevelop.CSharpBinding/CodeCompletionCSharp3Tests.cs b/main/tests/UnitTests/MonoDevelop.CSharpBinding/CodeCompletionCSharp3Tests.cs
index 46bd028e31..30092d1089 100644
--- a/main/tests/UnitTests/MonoDevelop.CSharpBinding/CodeCompletionCSharp3Tests.cs
+++ b/main/tests/UnitTests/MonoDevelop.CSharpBinding/CodeCompletionCSharp3Tests.cs
@@ -351,5 +351,31 @@ class Test
Assert.IsNotNull (provider.Find ("ToString"), "method 'ToString' not found.");
Assert.IsNull (provider.Find ("Length"), "property 'Length' found, but shouldn't (indicates wrong return type).");
}
+
+ [Test()]
+ public void TestDefaultParameterBug ()
+ {
+ CompletionDataList provider = CodeCompletionBugTests.CreateProvider (
+@"
+namespace Foo
+{
+ class Data
+ {
+ public int Value = 5;
+ }
+
+ public class C
+ {
+ public void Foo (bool aBool = false)
+ {
+ Data data;
+ $data.$
+ }
+ }
+}
+");
+ Assert.IsNotNull (provider, "provider == null");
+ Assert.IsNotNull (provider.Find ("Value"), "field 'Value' not found.");
+ }
}
}