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:
Joseph CursioandClaude Opus 5.5 committed 2026-10-15 14:49:07 -05:00
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