Re:The use of `class` for things that should be simple free ...
by kortilla on Thursday May 28, 2020 @12:41PM
(#23339380)
If you’re asserting non-public internals of a class, your testing is wrong in the first place. Assert outcomes, not the process.
[ Parent
| on HN ]
Re:The use of `class` for things that should be simple free ...
by nightski on Friday May 29, 2020 @11:52AM
(#23351450)
That's the whole point. You can't test outcomes if they are dependent on internal hidden state as that affects the outcome.
Whether you make it private or not hidden state leaks into the output since the output is dependent on it.