Fix running tests
- Dominant language
- Swift
- Stars
- 4.6k
- Forks
- 588
- PR merge metrics
- No merged PRs in 30d
Description
It seems that after enabling Library Evolution Support in #677 not all test cases are running.
There is one test case in Chatto - `ChatItemCompanionCollectionTests`. And a few of them in ChattoAdditions.
If XCTestCase uses a struct from Chatto it won't run.
Importing it as `@testable` doesn't seem to make any difference.
Removing `BUILD_LIBRARY_FOR_DISTRIBUTION` option solves the issue.
Making the struct `@frozen` also solves the issue.
If you run the test case individually, it'll work.
My environment:
- Xcode 12 & Xcode 11.7
- macOS 10.15.6
Contributor guide
Research direction
Start by running ChatItemCompanionCollectionTests and the affected ChattoAdditions tests under Xcode 11.7 or Xcode 12 with BUILD_LIBRARY_FOR_DISTRIBUTION enabled. Compare full-suite execution with running an individual test, then verify that all named XCTestCase tests run without removing the option or making structs @frozen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100