Impossible to test contents of app module (imported as @testable)

Originator:fellipe.caetano4
Number:rdar://22469765 Date Originated:2015-28-08
Status:Open Resolved:No
Product:Xcode Product Version:7.0 beta 6
Classification:Serious Bug Reproducible:Always
 
Summary:
If I try to reference some of the contents of my app module (a class, a struct, an enum et cetera) in a test case, Xcode builds the test target correctly but issues a build error when I try to run the test case.

Steps to Reproduce:
1. Create a test case (a subclass of XCTestCase) in a valid test target
2. Change the "Defines Module" build setting of the app target to "Yes"
3. Import the app target as a @testable module in the test case
4. Reference some content from the module (a class, struct, enum et cetera)
5. Run the tests

Expected Results:
I expected the tests to run as usual (either succeeding or failing as part of the normal testing flow)

Actual Results:
Xcode issued some build errors regarding failures in the linker

Version:
Xcode 7.0 beta 6
OS X 10.10.5

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!