mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SE-0138: Proposed amendment to SE-0138: Normalize UnsafeRawBufferPointer Slices (#8222)
* Add sliceability tests for Unsafe(Raw)BufferPointer.
Improve the generic sliceability tests to verify that SubSequence indices are
compatible with their parents indices.
* Fix and enable testing stdlib Collection instances.
Top-level entry points fully testing a collection instance:
check${Traversal}Collection
One level of recursion into all slices of the collection instance
O(n^2). (Not combinatorial).
Previously, checkCollection() did nothing. So much of the testing infrastructure was inactive. Now it runs all forward collection tests.
Fixes a bug in subscriptRangeTests.
The UnsafeRawBufferPointer and Data collection testing is disabled and
will be fixed in the following commit.
* Give UnsafeRawBufferPointer a distinct slice type.
SubSequence = RandomAccessSlice<Self>
* Fix raw buffer pointer tests after changing the API
* Add UnsafeRawBuffer(rebasing:) initializers.
Allows converting a raw slice into a zero-based raw buffer,
which is a common operation on flat memory.
Add and update UnsafeRawBufferPointer unit tests.
* Do not run recursive O(n^2) collection slice testing on large collections.
Now, even with collection unit testing wired up, the validation tests
take the same amount of time to execute.
* Add init(rebasing:) to UnsafeBufferPointer.
This is required for consistency with UnsafeRawBufferPointer.
* Update CHANGELOG.md for SE-0138 amendment: UnsafeRawBufferPointer slice type.
This commit is contained in:
@@ -144,7 +144,7 @@ func checkGraphemeClusterSegmentation(
|
||||
)
|
||||
|
||||
let expectedCharacters: [Character] = Array(subject.characters)
|
||||
checkSliceableWithBidirectionalIndex(expectedCharacters, subject.characters)
|
||||
checkBidirectionalCollection(expectedCharacters, subject.characters)
|
||||
}
|
||||
|
||||
func checkGraphemeClusterSegmentation(
|
||||
|
||||
Reference in New Issue
Block a user