mirror of
https://github.com/apple/swift-collections
synced 2026-11-27 04:54:21 +00:00
Check SortedSet with checkSetAlgebraMemberIdentity
Run the member identity checker against SortedSet, including a multi-level tree. With #761's fix reverted, it fails with the wrong member stored by insert(_:) and update(with:), as reported in #760. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5e46772f5e
commit
e700932e3b
1 file changed
+7
@@ -680,6 +680,13 @@ extension SortedSetTests {
|
||||
]
|
||||
checkSetAlgebra(models.map { SortedSet($0) }, models: models)
|
||||
}
|
||||
|
||||
func test_SetAlgebraMemberIdentity() {
|
||||
checkSetAlgebraMemberIdentity(
|
||||
SortedSet<LifetimeTracked<Int>>.self,
|
||||
models: [[], [0], [0, 1, 2, 3], Set(stride(from: 0, to: 200, by: 2))],
|
||||
members: { Array($0) })
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user