Hi,

On 03/23/2015 01:48 AM, Henk van Oers wrote:

On Sun, 22 Mar 2015, Tom Browder wrote:
On Sun, Mar 22, 2015 at 7:13 PM, Henk van Oers <h...@signature.nl> wrote:
On Sun, 22 Mar 2015, Tom Browder wrote:
I'm trying to write a test.
To test what? Your own typo's?

The tests are for a public Perl 6 module translated from an existing
Perl 5 module.

Do Perl 6 modules not need tests?

Yes they need tests.

If so, which ones do they need?

The public interface.

I agree with this part (test the public interface), but if you really want/need to, you *can* introspect the private methods too. See http://doc.perl6.org/type/Metamodel::PrivateMethodContainer#method_private_method_table

Note that private methods aren't inherited, so getting the private methods from one level in the class hierarchy (the one that you want to call the private method of) is enough.

That said, I wonder why tests need introspection at all. I mean, you test by doing example calls and comparing to expected example return values.

(If those are generated methods, IMHO there is no point in testing all generated instances).

Cheers,
Moritz

Reply via email to