Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make StringLineGroup returns a count limited Enumerator #759

Merged
merged 5 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add tests for non-boxed enumerator of StringLineGroup.
  • Loading branch information
Akarinnnnn authored Dec 12, 2023
commit 2ae2cf9263d5d0e3752ebf94b0021c5e8bf92d63
9 changes: 8 additions & 1 deletion src/Markdig.Tests/TestStringSliceList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,12 @@ public void TestStringLineGroup_EnumeratorReturnsRealLines()
StringLine currentLine = (StringLine)enumerator.Current;
TextAssert.AreEqual("A", currentLine.ToString());
Assert.False(enumerator.MoveNext());

var nonBoxedEnumerator = text.GetEnumerator();

Assert.True(nonBoxedEnumerator.MoveNext());
currentLine = (StringLine)nonBoxedEnumerator.Current;
TextAssert.AreEqual("A", currentLine.ToString());
Assert.False(nonBoxedEnumerator.MoveNext());
}
}
}
Loading