<div dir="ltr">Check out the `testable` attribute: <a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Attributes.html#//apple_ref/doc/uid/TP40014097-CH35-ID347">https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Attributes.html#//apple_ref/doc/uid/TP40014097-CH35-ID347</a><div><br></div><div>Lots of examples if you type `swift testable` into your favorite search engine.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 1, 2016 at 4:04 PM, John Heerema via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>I’m a fan of test-driven development.</div>
<div>I use it myself, and teach it to students and colleagues.</div>
<div><br>
</div>
<div>One of the nice things about Swift 1.0 was that it was easy to write module tests.</div>
<div><br>
</div>
<div>When access controls were introduced into Swift, I found that many functions and objects that had no genuine need to be public, suddenly had to become public in order to be tested. That just seems wrong to me.</div>
<div><br>
</div>
<div>I’d like to see a way for tests, which are not normally part of the module, to have access to a module’s contents (I’m talking source only – not packages that do not include source). That might simply be a feature of the IDE, rather than a language feature.</div>
<div><br>
</div>
<div>On another note, I see “file private” (whatever it’s called) as a legacy of C. I have trouble seeing it as being truly useful, but can see that others might have genuine uses for it (actually, I’d like to hear what they might be)</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Dr. J. Heerema </div>
<div><br>
</div>
<div><br>
</div>
</div>

<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div>