# \[Pitch\] @testable private members

**URL:** <https://forums.swift.org/t/pitch-testable-private-members/5242>\
**Category:** Pitches\
**Created:** [February 18, 2017, 6:14pm UTC](https://forums.swift.org/t/pitch-testable-private-members/5242 "2017-02-18T18:14:16Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![DeFrenZ](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/defrenz/32/827_2.png) [@DeFrenZ](https://forums.swift.org/u/DeFrenZ)\
**Post date:** [April 24, 2018, 6:04pm UTC](https://forums.swift.org/t/pitch-testable-private-members/5242/9 "2018-04-24T18:04:33Z")

</div>

My favourite solution to this is to allow tests in the same scope of the function (as previously mentioned by someone [like D does](https://dlang.org/spec/unittest.html)). Though it is quite a big language feature to implement which I don't even know if Swift wants, and if so it might even need to move away from XCTest...

Edit: It seems like @codafi went ahead and [did a full proposal](https://forums.swift.org/t/rfc-in-line-tests/12111) just minutes before I wrote this 😛

---

_[View the full topic](https://forums.swift.org/t/pitch-testable-private-members/5242)._
