diff --git a/Tests/BitCollectionsTests/BitSet.Counted Tests.swift b/Tests/BitCollectionsTests/BitSet.Counted Tests.swift index e28676816..23eba6b6e 100644 --- a/Tests/BitCollectionsTests/BitSet.Counted Tests.swift +++ b/Tests/BitCollectionsTests/BitSet.Counted Tests.swift @@ -18,6 +18,19 @@ import BitCollections import OrderedCollections #endif +#if compiler(>=6.0) +extension BitSet.Counted: @retroactive SetAPIChecker {} + +extension BitSet.Counted: @retroactive SetAPIExtras { + public mutating func update(_ member: Int, at index: Index) -> Int { + fatalError("Not this one though") + } +} + +extension BitSet.Counted: @retroactive SortedCollectionAPIChecker {} +#else +extension BitSet.Counted: SetAPIChecker {} + extension BitSet.Counted: SetAPIExtras { public mutating func update(_ member: Int, at index: Index) -> Int { fatalError("Not this one though") @@ -25,6 +38,8 @@ extension BitSet.Counted: SetAPIExtras { } extension BitSet.Counted: SortedCollectionAPIChecker {} +#endif + final class BitSetCountedTests: CollectionTestCase { func test_union() { diff --git a/Tests/BitCollectionsTests/BitSetTests.swift b/Tests/BitCollectionsTests/BitSetTests.swift index ace4d570c..ed9129a62 100644 --- a/Tests/BitCollectionsTests/BitSetTests.swift +++ b/Tests/BitCollectionsTests/BitSetTests.swift @@ -18,6 +18,19 @@ import BitCollections import OrderedCollections #endif +#if compiler(>=6.0) +extension BitSet: @retroactive SetAPIChecker {} + +extension BitSet: @retroactive SetAPIExtras { + public mutating func update(_ member: Int, at index: Index) -> Int { + fatalError("Not this one though") + } +} + +extension BitSet: @retroactive SortedCollectionAPIChecker {} +#else +extension BitSet: SetAPIChecker {} + extension BitSet: SetAPIExtras { public mutating func update(_ member: Int, at index: Index) -> Int { fatalError("Not this one though") @@ -25,6 +38,7 @@ extension BitSet: SetAPIExtras { } extension BitSet: SortedCollectionAPIChecker {} +#endif final class BitSetTest: CollectionTestCase { func test_empty_initializer() { diff --git a/Tests/HashTreeCollectionsTests/TreeDictionary Tests.swift b/Tests/HashTreeCollectionsTests/TreeDictionary Tests.swift index 247deb70a..4fbe7920c 100644 --- a/Tests/HashTreeCollectionsTests/TreeDictionary Tests.swift +++ b/Tests/HashTreeCollectionsTests/TreeDictionary Tests.swift @@ -16,7 +16,13 @@ import _CollectionsTestSupport import HashTreeCollections #endif +#if compiler(>=6.0) +extension TreeDictionary: @retroactive DictionaryAPIChecker {} +extension TreeDictionary: @retroactive DictionaryAPIExtras {} +#else +extension TreeDictionary: DictionaryAPIChecker {} extension TreeDictionary: DictionaryAPIExtras {} +#endif class TreeDictionaryTests: CollectionTestCase { func test_empty() { diff --git a/Tests/HashTreeCollectionsTests/TreeSet Tests.swift b/Tests/HashTreeCollectionsTests/TreeSet Tests.swift index ce018b6e1..02a6486bb 100644 --- a/Tests/HashTreeCollectionsTests/TreeSet Tests.swift +++ b/Tests/HashTreeCollectionsTests/TreeSet Tests.swift @@ -16,7 +16,11 @@ import _CollectionsTestSupport import HashTreeCollections #endif +#if compiler(>=6.0) +extension TreeSet: @retroactive SetAPIExtras {} +#else extension TreeSet: SetAPIExtras {} +#endif class TreeSetTests: CollectionTestCase { func test_init_empty() { diff --git a/Tests/OrderedCollectionsTests/OrderedDictionary/OrderedDictionary Tests.swift b/Tests/OrderedCollectionsTests/OrderedDictionary/OrderedDictionary Tests.swift index eacd60980..29c81c41e 100644 --- a/Tests/OrderedCollectionsTests/OrderedDictionary/OrderedDictionary Tests.swift +++ b/Tests/OrderedCollectionsTests/OrderedDictionary/OrderedDictionary Tests.swift @@ -17,7 +17,13 @@ import XCTest import _CollectionsTestSupport #endif +#if compiler(>=6.0) +extension OrderedDictionary: @retroactive DictionaryAPIChecker {} +extension OrderedDictionary: @retroactive DictionaryAPIExtras {} +#else +extension OrderedDictionary: DictionaryAPIChecker {} extension OrderedDictionary: DictionaryAPIExtras {} +#endif class OrderedDictionaryTests: CollectionTestCase { func test_empty() { diff --git a/Tests/OrderedCollectionsTests/OrderedSet/OrderedSetTests.swift b/Tests/OrderedCollectionsTests/OrderedSet/OrderedSetTests.swift index 53e5cd77d..1e83794ae 100644 --- a/Tests/OrderedCollectionsTests/OrderedSet/OrderedSetTests.swift +++ b/Tests/OrderedCollectionsTests/OrderedSet/OrderedSetTests.swift @@ -17,7 +17,13 @@ import XCTest import _CollectionsTestSupport #endif +#if compiler(>=6.0) +extension OrderedSet: @retroactive SetAPIChecker {} +extension OrderedSet: @retroactive SetAPIExtras {} +#else +extension OrderedSet: SetAPIChecker {} extension OrderedSet: SetAPIExtras {} +#endif class OrderedSetTests: CollectionTestCase { func test_init_uncheckedUniqueElements_concrete() {