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@xamarin.com>2011-11-09 17:58:38 +0400
committerMike Krüger <mkrueger@xamarin.com>2011-11-09 18:07:22 +0400
commit63a2069ad92ea0836adf4a6d5a5d401aee510a31 (patch)
tree91c44702ef03b03311821f22845f8c03d0c2000e /main/tests
parent00f53d719bf6313272333e719fc5083b8aa23d75 (diff)
[TextEditor] Fixed bug in segment tree (Part of "Bug 1963 - Replacing
collapsed code acts strangely").
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/UnitTests/Mono.TextEditor.Tests/SegmentTreeTests.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/tests/UnitTests/Mono.TextEditor.Tests/SegmentTreeTests.cs b/main/tests/UnitTests/Mono.TextEditor.Tests/SegmentTreeTests.cs
index d56cf47129..7b5457b01e 100644
--- a/main/tests/UnitTests/Mono.TextEditor.Tests/SegmentTreeTests.cs
+++ b/main/tests/UnitTests/Mono.TextEditor.Tests/SegmentTreeTests.cs
@@ -80,6 +80,20 @@ namespace Mono.TextEditor.Tests
}
[Test()]
+ public void TestUpdateOnTextReplace ()
+ {
+ var collection = new SegmentTree<TreeSegment> ();
+
+ collection.Add (new TreeSegment (0, 89));
+ collection.Add (new TreeSegment (92, 51));
+ collection.Add (new TreeSegment (42, 77));
+ collection.Add (new TreeSegment (36, 128));
+ collection.UpdateOnTextReplace (this, new ReplaceEventArgs (0, 355, null));
+
+ Assert.AreEqual (0, collection.Count);
+ }
+
+ [Test()]
public void TestSimpleRemove ()
{
var collection = new SegmentTree<TreeSegment> ();