What's the difference between importing a target into unit testing and including that file among the target Membership?
When I'm writing tests I can do: How is the above different from adding the Test File to a specific Target? Ultimately my question is: Had I made my unitTests a target to all my files...would it be equivalent to doing: If not, then what is the difference? From the Swift docs under the heading Access Levels for Unit Test Targets (emphasis added) When you write an app with a unit test target, the code in your app needs to be made available to that module in order to be tested. By default, only entities marked as open or public are accessible to other modules. However, a unit test target can access any internal entity, if you mark the import declaration for a product module with the @testable attribute and compile that product module with testing enabled. These docs say that the @testable attribute provides your Unit Test target access to all internals of the module marked as @testable. Thus letting you avoid having to manually add individual files in that module to the Unit Test tar...