Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lorentey opened this issue Sep 2, 2021 · 2 comments
Open

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

lorentey opened this issue Sep 2, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers Heap Min-max heap module

Comments

@lorentey
Copy link
Member

lorentey commented Sep 2, 2021

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 lorentey added bug Something isn't working good first issue Good for newcomers Heap Min-max heap module labels Sep 2, 2021
just-gull added a commit to just-gull/swift-collections that referenced this issue Oct 7, 2021
@testable import is replaced with @_spi(Testing) import.
A test for _Node is moved to another file because this test needs access to internals of PriorityQueueModule and this test will not work in optimized builds.
@lorentey lorentey linked a pull request Oct 12, 2021 that will close this issue
7 tasks
@lorentey
Copy link
Member Author

#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 added a commit that referenced this issue Oct 23, 2021
[Heap] Enable heap tests in optimized builds (#101)
@XaurDesu
Copy link

XaurDesu commented Sep 4, 2023

Is there anything else to be done on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Heap Min-max heap module
Projects
None yet
Development

No branches or pull requests

2 participants