Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2382 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
3 changed files with 52 additions and 0 deletions
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using ICSharpCode.SharpDevelop.Tests.Utils; |
||||
using ICSharpCode.TextEditor.Document; |
||||
using SearchAndReplace; |
||||
using NUnit.Framework; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Tests |
||||
{ |
||||
/// <summary>
|
||||
/// The fix for SD2-857 highlighted another bug (SD2-1312) in the
|
||||
/// ForwardTextIterator where it does not handle the case where
|
||||
/// the ITextBufferStrategy has a length of zero.
|
||||
/// </summary>
|
||||
[TestFixture] |
||||
public class ForwardIteratorWithEmptyTextBufferTestFixture |
||||
{ |
||||
ForwardTextIterator forwardTextIterator; |
||||
|
||||
[SetUp] |
||||
public void SetUp() |
||||
{ |
||||
// Create the document to be iterated through.
|
||||
MockDocument doc = new MockDocument(); |
||||
StringTextBufferStrategy textBufferStrategy = new StringTextBufferStrategy(); |
||||
doc.TextBufferStrategy = textBufferStrategy; |
||||
ProvidedDocumentInformation docInfo = new ProvidedDocumentInformation(doc, |
||||
@"C:\Temp\test.txt", |
||||
0); |
||||
|
||||
// Create the forward iterator.
|
||||
forwardTextIterator = new ForwardTextIterator(docInfo); |
||||
} |
||||
|
||||
[Test] |
||||
public void CannotMoveAhead() |
||||
{ |
||||
Assert.IsFalse(forwardTextIterator.MoveAhead(1)); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue