_BString.resolve: Don’t crash when resolving indices in the empty string

This commit is contained in:
Karoy Lorentey committed 2023-03-20 13:12:14 -07:00
1 parent 64a8098bf9
commit b50fb5aab5
2 files changed
+7 -2

No files matched your search

+3
View File
@@ -48,6 +48,9 @@ class TestBString: XCTestCase {
XCTAssertTrue(s.isEmpty)
XCTAssertEqual(s.startIndex, s.endIndex)
XCTAssertEqual(s.startIndex._utf8Offset, 0)
XCTAssertEqual(String(_from: s), "")
XCTAssertEqual(String(_from: s[...]), "")
}
func test_string_conversion() {