如果测试位于与生产代码不同的模块中(这是常见的),那么使内部函数对测试可见的最佳方式是什么?
In Java, I would have the production code and the test in the same package and make the methods-to-be-tested package-private (plus, add a @VisibleForTest
annotation if the only reason for having it package-private rather than private is the test). Unfortunately, Kotlin doesn't have the concept of package-private.