There were some tab characters. Now they're dead.
git-svn-id: file:///srv/devel/repo-conversion/nusu@300 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
2c3d9db4c9
commit
91d382a940
|
@ -158,73 +158,73 @@ namespace Nuclex.Support.Parsing {
|
||||||
Assert.AreEqual(5, index);
|
Assert.AreEqual(5, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verifies that trying to skip text as if it was an integer skips nothing
|
/// Verifies that trying to skip text as if it was an integer skips nothing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void SkippingTextAsIntegerReturnsFalse() {
|
public void SkippingTextAsIntegerReturnsFalse() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsFalse(ParserHelper.SkipInteger("hello", ref index));
|
Assert.IsFalse(ParserHelper.SkipInteger("hello", ref index));
|
||||||
Assert.AreEqual(0, index);
|
Assert.AreEqual(0, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Ensures that the SkipIntegers() method can handle null strings</summary>
|
/// <summary>Ensures that the SkipIntegers() method can handle null strings</summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void CanSkipStringInNullString() {
|
public void CanSkipStringInNullString() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsFalse(ParserHelper.SkipString((string)null, ref index));
|
Assert.IsFalse(ParserHelper.SkipString((string)null, ref index));
|
||||||
Assert.AreEqual(0, index);
|
Assert.AreEqual(0, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Ensures that the SkipNumbers() method can handle empty strings</summary>
|
/// <summary>Ensures that the SkipNumbers() method can handle empty strings</summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void CanSkipStringInEmptyString() {
|
public void CanSkipStringInEmptyString() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsFalse(ParserHelper.SkipString(string.Empty, ref index));
|
Assert.IsFalse(ParserHelper.SkipString(string.Empty, ref index));
|
||||||
Assert.AreEqual(0, index);
|
Assert.AreEqual(0, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Verifies that a string consisting of a single word can be skipped</summary>
|
/// <summary>Verifies that a string consisting of a single word can be skipped</summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void SingleWordStringsCanBeSkipped() {
|
public void SingleWordStringsCanBeSkipped() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsTrue(ParserHelper.SkipString("hello", ref index));
|
Assert.IsTrue(ParserHelper.SkipString("hello", ref index));
|
||||||
Assert.AreEqual(5, index);
|
Assert.AreEqual(5, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verifies that a space character is not skipped over when skipping a string
|
/// Verifies that a space character is not skipped over when skipping a string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void SpaceTerminatesUnquotedStrings() {
|
public void SpaceTerminatesUnquotedStrings() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsTrue(ParserHelper.SkipString("hello world", ref index));
|
Assert.IsTrue(ParserHelper.SkipString("hello world", ref index));
|
||||||
Assert.AreEqual(5, index);
|
Assert.AreEqual(5, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Verifies that a string in quotes continues until the closing quote</summary>
|
/// <summary>Verifies that a string in quotes continues until the closing quote</summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void QuotedStringsCanBeSkipped() {
|
public void QuotedStringsCanBeSkipped() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsTrue(ParserHelper.SkipString("\"This is a test\"", ref index));
|
Assert.IsTrue(ParserHelper.SkipString("\"This is a test\"", ref index));
|
||||||
Assert.AreEqual(16, index);
|
Assert.AreEqual(16, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Verifies that a string in quotes continues until the closing quote</summary>
|
/// <summary>Verifies that a string in quotes continues until the closing quote</summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void QuotedStringsStopAtClosingQuote() {
|
public void QuotedStringsStopAtClosingQuote() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsTrue(ParserHelper.SkipString("\"This is a test\" but this not.", ref index));
|
Assert.IsTrue(ParserHelper.SkipString("\"This is a test\" but this not.", ref index));
|
||||||
Assert.AreEqual(16, index);
|
Assert.AreEqual(16, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Verifies that a string in quotes continues until the closing quote</summary>
|
/// <summary>Verifies that a string in quotes continues until the closing quote</summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void QuotedStringRequiresClosingQuote() {
|
public void QuotedStringRequiresClosingQuote() {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Assert.IsFalse(ParserHelper.SkipString("\"This is missing the closing quote", ref index));
|
Assert.IsFalse(ParserHelper.SkipString("\"This is missing the closing quote", ref index));
|
||||||
Assert.AreEqual(0, index);
|
Assert.AreEqual(0, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user