[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is it possible to test local funtion with lunit?
- From: Coda Highland <chighland@...>
- Date: Wed, 30 Jul 2014 21:37:34 -0700
On Wed, Jul 30, 2014 at 7:03 PM, albert_200200 <firstname.lastname@example.org> 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