From 2ae2cf9263d5d0e3752ebf94b0021c5e8bf92d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fa=E9=B8=BD?= <43724908+Akarinnnnn@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:18:10 +0800 Subject: [PATCH] Add tests for non-boxed enumerator of `StringLineGroup`. --- src/Markdig.Tests/TestStringSliceList.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Markdig.Tests/TestStringSliceList.cs b/src/Markdig.Tests/TestStringSliceList.cs index 6136c246..1ce99dda 100644 --- a/src/Markdig.Tests/TestStringSliceList.cs +++ b/src/Markdig.Tests/TestStringSliceList.cs @@ -231,5 +231,12 @@ public class TestStringSliceList 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()); } -} \ No newline at end of file +}