Skip to content

Adopt Swift Testing #41

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

Merged
merged 8 commits into from
Oct 20, 2024
Merged

Adopt Swift Testing #41

merged 8 commits into from
Oct 20, 2024

Conversation

dfed
Copy link
Owner

@dfed dfed commented Oct 20, 2024

Migrates from XCTest to Swift Testing. I ended up having to create an Expectation type to mimic what XCTest has, since confirmations require the confirmation to be confirmed before the confirmation closure exits, which doesn't work terribly well in a highly async environment.

@dfed dfed self-assigned this Oct 20, 2024
@dfed dfed force-pushed the dfed--swift-testing branch from b750536 to 757d7c3 Compare October 20, 2024 02:27
Copy link

codecov bot commented Oct 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b51448d) to head (d8a272d).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              main       #41    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            9        11     +2     
  Lines          666      1060   +394     
==========================================
+ Hits           666      1060   +394     
Files with missing lines Coverage Δ
Tests/AsyncQueueTests/ActorQueueTests.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/ExpectationTests.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/FIFOQueueTests.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/MainActorQueueTests.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/SemaphoreTests.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/Utilities/Counter.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/Utilities/Expectation.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/Utilities/Semaphore.swift 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

@dfed dfed force-pushed the dfed--swift-testing branch from 757d7c3 to 7393888 Compare October 20, 2024 02:34
@dfed dfed force-pushed the dfed--swift-testing branch from 3fb6c7b to f9163f9 Compare October 20, 2024 02:58
@dfed dfed force-pushed the dfed--swift-testing branch from 5c584c3 to fab5c47 Compare October 20, 2024 04:28
@dfed dfed force-pushed the dfed--swift-testing branch from 19eb1ef to 17f0730 Compare October 20, 2024 05:07

import Testing

public actor Expectation {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite similar to the Expectation in the dfed/swift-testing-expectation repo. I figure it is best to keep this repo having zero dependencies, and a little copy/paste never hurt anyone.

@dfed dfed merged commit 40e9bb6 into main Oct 20, 2024
7 checks passed
@dfed dfed deleted the dfed--swift-testing branch October 20, 2024 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant