Commit Graph
3 Commits
Author SHA1 Message Date
Konrad `ktoso` Malawski 876586f924 expect type is correct 2022-08-17 11:06:07 +09:00
Károly Lőrentey 13b5889757 [OrderedCollections][test] Strengthen withHiddenCopies tests
`withHiddenCopies(if:of:)` is supposed to check for value semantic violations where mutations of one copy affect another -- however, it currently only checks that iteration returns the same items before/after the change, not that the old copy is still in a fully consistent state.

Add an extra parameter that can be set to a closure that performs stricter checks.

Use it to call `_checkInvariants()` in ordered collections tests, uncovering a missing uniqueness check in `OrderedSet._insertNew(_:at:in:)`.
2021-11-11 00:39:29 -08:00
Karoy Lorentey f1f48d569a [test] CollectionsTestSupport → _CollectionsTestSupport
The underscored module name makes it clear that this isn't public API.
2021-09-03 15:57:09 -07:00