Skip to content

Commit

Permalink
Add tests for non-boxed enumerator of StringLineGroup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Akarinnnnn authored Dec 12, 2023
1 parent ba1e562 commit 2ae2cf9
Showing 1 changed file with 8 additions and 1 deletion.
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());
}
}
}

0 comments on commit 2ae2cf9

Please sign in to comment.