Swift unit tests should get access to module-under-test internal components

Originator:klaaspieter
Number:rdar://19483909 Date Originated:15-Jan-2015 10:27 AM
Status:Duplicate: 17732115 Resolved:
Product:Developer Tools Product Version:Xcode-Beta (6C101)
Classification:Enhancement Reproducible:Always
 
Summary:
Tests should verify the public behavior of a component. In Swift a component’s internal methods are public from within the module they belong too. In order to test this internal public behavior, a method is required to make tests part of that module.

Steps to Reproduce:
1. Create an internal class or method
2. Attempt to use that class or method from the unit test target

Expected Results:
The unit test should have access to the class / method

Actual Results:
The unit test does not have access

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!