Browse Source

Fix build.

newNRvisualizers
Daniel Grunwald 13 years ago
parent
commit
f38b2e3cc7
  1. 15
      src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockDocument.cs
  2. 8
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/ChangeTrackingTest.cs
  3. 2
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/LineManagerTests.cs
  4. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory/Editor/StringBuilderDocument.cs

15
src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockDocument.cs

@ -223,5 +223,20 @@ namespace XmlEditor.Tests.Utils
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public void Insert(int offset, ITextSource text)
{
throw new NotImplementedException();
}
public void Insert(int offset, ITextSource text, AnchorMovementType defaultAnchorMovementType)
{
throw new NotImplementedException();
}
public void Replace(int offset, int length, ITextSource newText)
{
throw new NotImplementedException();
}
} }
} }

8
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/ChangeTrackingTest.cs

@ -34,8 +34,8 @@ namespace ICSharpCode.AvalonEdit.Document
Assert.AreEqual(-1, snapshot1.Version.CompareAge(snapshot2.Version)); Assert.AreEqual(-1, snapshot1.Version.CompareAge(snapshot2.Version));
TextChangeEventArgs[] arr = snapshot1.Version.GetChangesTo(snapshot2.Version).ToArray(); TextChangeEventArgs[] arr = snapshot1.Version.GetChangesTo(snapshot2.Version).ToArray();
Assert.AreEqual(2, arr.Length); Assert.AreEqual(2, arr.Length);
Assert.AreEqual("nw", arr[0].InsertedText); Assert.AreEqual("nw", arr[0].InsertedText.Text);
Assert.AreEqual("e", arr[1].InsertedText); Assert.AreEqual("e", arr[1].InsertedText.Text);
Assert.AreEqual("initial text", snapshot1.Text); Assert.AreEqual("initial text", snapshot1.Text);
Assert.AreEqual("new text", snapshot2.Text); Assert.AreEqual("new text", snapshot2.Text);
@ -52,8 +52,8 @@ namespace ICSharpCode.AvalonEdit.Document
Assert.AreEqual(1, snapshot2.Version.CompareAge(snapshot1.Version)); Assert.AreEqual(1, snapshot2.Version.CompareAge(snapshot1.Version));
TextChangeEventArgs[] arr = snapshot2.Version.GetChangesTo(snapshot1.Version).ToArray(); TextChangeEventArgs[] arr = snapshot2.Version.GetChangesTo(snapshot1.Version).ToArray();
Assert.AreEqual(2, arr.Length); Assert.AreEqual(2, arr.Length);
Assert.AreEqual("", arr[0].InsertedText); Assert.AreEqual("", arr[0].InsertedText.Text);
Assert.AreEqual("initial", arr[1].InsertedText); Assert.AreEqual("initial", arr[1].InsertedText.Text);
Assert.AreEqual("initial text", snapshot1.Text); Assert.AreEqual("initial text", snapshot1.Text);
Assert.AreEqual("new text", snapshot2.Text); Assert.AreEqual("new text", snapshot2.Text);

2
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/LineManagerTests.cs

@ -105,7 +105,7 @@ namespace ICSharpCode.AvalonEdit.Document
[Test, ExpectedException(typeof(ArgumentNullException))] [Test, ExpectedException(typeof(ArgumentNullException))]
public void InsertNull() public void InsertNull()
{ {
document.Insert(0, null); document.Insert(0, (string)null);
} }
[Test, ExpectedException(typeof(ArgumentNullException))] [Test, ExpectedException(typeof(ArgumentNullException))]

2
src/Libraries/NRefactory/ICSharpCode.NRefactory/Editor/StringBuilderDocument.cs

@ -192,7 +192,7 @@ namespace ICSharpCode.NRefactory.Editor
documentSnapshot = null; documentSnapshot = null;
cachedText = null; cachedText = null;
b.Remove(change.Offset, change.RemovalLength); b.Remove(change.Offset, change.RemovalLength);
b.Insert(change.Offset, change.InsertedText); b.Insert(change.Offset, change.InsertedText.Text);
versionProvider.AppendChange(change); versionProvider.AppendChange(change);
// Update anchors and fire Deleted events // Update anchors and fire Deleted events

Loading…
Cancel
Save