swift-collections icon indicating copy to clipboard operation
swift-collections copied to clipboard

[Heap] We should be able to run tests in optimized builds

Open lorentey opened this issue 3 years ago • 2 comments

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.

lorentey avatar Sep 02 '21 02:09 lorentey

#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.

lorentey avatar Oct 12 '21 19:10 lorentey

Is there anything else to be done on this issue?

XaurDesu avatar Sep 04 '23 17:09 XaurDesu