Swift – Unit testing private variables and methods

You can’t test private methods in Swift using @testable. You can only test methods marked either internal or public. As the docs say:

Note: @testable provides access only for “internal” functions;
“private” declarations are not visible outside of their file even when
using @testable.

Read more here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)