lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jul 30, 2014 at 7:03 PM, albert_200200 <albert_200200@126.com> wrote:
> Really thanks for your quick reply. Your following meaning I didn't
> understand well. Do you mean every method I want to make sure it's correct
> and to test,  I should make this method public, Is that your meaning?

No, that's the opposite of what I was trying to say. I'm trying to say
that tests shouldn't be poking at the internals. Tests should be just
like user code -- they should test the functions that the user can
call, and the private functions should be implementation details that
the tests shouldn't have to know about.

The other part I was saying is that there are ways to work around it
if, in the end, you decide that you have some internal function that
REALLY, REALLY needs tested on its own but shouldn't be exposed to the
user.

/s/ Adam