Add tests for non-boxed enumerator of StringLineGroup.

This commit is contained in:
Fa鸽
2023-12-12 16:18:10 +08:00
committed by GitHub
parent ba1e562d2f
commit 2ae2cf9263

View File

@@ -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());
}
}
}