mirror of
https://github.com/apple/swift-collections
synced 2026-11-30 05:18:44 +00:00
_BString.resolve: Don’t crash when resolving indices in the empty string
This commit is contained in:
2 files changed
+7
-2
No files matched your search
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user