From e700932e3bbdddea024727fefbc313675d758c1c Mon Sep 17 00:00:00 2001 From: Joseph Cursio Date: Thu, 15 Oct 2026 14:49:07 -0500 Subject: [PATCH] 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 --- .../SortedCollectionsTests/SortedSet/SortedSet Tests.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift b/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift index ae5d3ca0..c6e580f7 100644 --- a/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift +++ b/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift @@ -680,6 +680,13 @@ extension SortedSetTests { ] checkSetAlgebra(models.map { SortedSet($0) }, models: models) } + + func test_SetAlgebraMemberIdentity() { + checkSetAlgebraMemberIdentity( + SortedSet>.self, + models: [[], [0], [0, 1, 2, 3], Set(stride(from: 0, to: 200, by: 2))], + members: { Array($0) }) + } } #endif