Browse Source

Fixed XML comment bug.

pull/32/merge
Mike Krüger 13 years ago
parent
commit
f49dfb66ac
  1. 2
      ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs
  2. 32
      ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/DocumentationContextTests.cs

2
ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs

@ -3027,7 +3027,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion @@ -3027,7 +3027,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (startIndex >= 0) {
int endIndex = startIndex;
while (endIndex + 1 < lineText.Length && lineText [endIndex] != '>' && !Char.IsWhiteSpace (lineText [endIndex + 1])) {
while (endIndex + 1 < lineText.Length && lineText [endIndex] != '>' && !char.IsWhiteSpace (lineText [endIndex])) {
endIndex++;
}
string tag = endIndex - startIndex - 1 > 0 ? lineText.Substring(

32
ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/DocumentationContextTests.cs

@ -29,10 +29,10 @@ using NUnit.Framework; @@ -29,10 +29,10 @@ using NUnit.Framework;
namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
{
[TestFixture()]
[TestFixture]
public class DocumentationContextTests
{
[Test()]
[Test]
public void TestClosingTag()
{
CodeCompletionBugTests.CombinedProviderTest(
@ -50,11 +50,11 @@ public class Test @@ -50,11 +50,11 @@ public class Test
});
}
[Test()]
[Test]
public void TestClosingTagMultiLine()
{
CodeCompletionBugTests.CombinedProviderTest(
@"using System;
@"using System;
public class Test
{
@ -69,6 +69,30 @@ public class Test @@ -69,6 +69,30 @@ public class Test
Assert.IsNotNull(provider.Find("/summary>"));
});
}
/// <summary>
/// Bug 9998 - Doc comments completion offers </para> as end tag for <param>
/// </summary>
[Test]
public void TestBug9998()
{
CodeCompletionBugTests.CombinedProviderTest(
@"using System;
public class Test
{
/// <summary>
/// </summary>
/// <param name=""args""> $<$
public static void Main(string[] args)
{
}
}
", provider => {
Assert.IsNotNull(provider.Find("/param>"));
});
}
}
}

Loading…
Cancel
Save