badoo / badoo/Chatto

Fix running tests

Open
#681 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.