swift-collections
swift-collections copied to clipboard
[Heap] We should be able to run tests in optimized builds
Currently the Heap
tests in ./Tests/PriorityQueueTests/HeapTests.swift are relying on @testable import
to access internal interfaces. Unfortantely this doesn't work in release mode, so we can only run heap tests in debug builds.
We ought to be able to run these correctness tests with optimizations enabled. The way to do this is to replace direct use of internal interfaces with an __unstable
view and/or @_spi(Testing)
-- see e.g. how OrderedSet
does this.
#115 allows all but one Heap tests to run in optimized builds. There are additional tests incoming though, so let's keep this open for now.
Is there anything else to be done on this issue?